I have to selects that trigger the next functions:
const firstQuery = (value) => {
history.replace(`${match.path}cars/?car=${value}`);
};
const secondQuery = (value) => {
history.replace(`${match.path}cars/?color=${value}`);
};
When i trigger the first function the url is changing ok: my-site/cars/?car=audi, but when i trigger the second one it reset the first value of ?car=audi and i get my-site/cars/?color=red, but my expectation is to get something like: my-site/cars/?car=audi&color=red
How to fix this and to get what i expect?