Answer the question
In order to leave comments, you need to log in
Applying and resetting multiple filters at the same time in React + redux?
Hello. I need multiple selected filters to be applied to a list of products when a button is clicked. As well as resetting these filters. So far, I am completely confused in react and cannot find a similar example on the Internet.
Main questions:
1. Where to do the filter function?
2. Do I need to make separate actions for each filter, or is it normal for me now too?
3. How to combine all the state changes of the selected filters and update the original array?
4. How to trigger all this with 1 button?
I understand that for experienced developers these are trivial questions, but for me it's just a dark forest. No matter how much I watch / read guides. Ideally, of course, I would like a ready-made example in order to understand it already. Help me please.
Repo with code: https://github.com/SolidMike/react-hotels/tree/mai...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question