Good evening,
I have a list / array of movies that I need to filter using two values (published and category). The current code allows a user to filter movies that has both values selected. However the problem I want to fix, is if;
- A user select for example "Action", it should return all movies with category action.
- Or another scenario where a user select "1999", show all movies published that year.
- It shouldn't lose the current functionality either, as i want to allow user to filter both single values and combined.
Current code here: https://codesandbox.io/s/focused-sun-2lkfx?file=/src/App.js
I have seen examples for filtering a specific value, but in a scenario where user can specify something and add another filter to it, i don't know how to approach it.