@mattari97
Posted
Hello Katherine. Congratulations on completing this challenge.
Regarding your question about the filters. I think local-storage is a really good solution if you need to keep the values when the user closes/refreshes the browser but if you just need to keep the "state" when your switch between components/pages you might wanna use a state management solution. I have three of them in mind so take a look and see if it fits you requirements:
1- The Context API. It is the built in solution in React but can be a bit hard to setup and quite verbose. However it means no additional dependencies which is always great 😉
2- Jotai Very simple and flexible state management library for React.
3- Zustand. This is my favorite. Really awesome state management library.
Each of these solution allow you to "share" some state between components/pages.
Hope it helps. Happy coding. Peace 😀
Marked as helpful
@rendongzha
Posted
@AntoineC-dev Thank you for the suggestion. It is very helpful and to the point. The issue here is to maintain state across components. After I applied a state management system, it looks much better now. 😄