Search code examples
firebasereact-nativegoogle-cloud-firestoreredux

Using Redux or not for filter options


I'm very new to React Native (did some courses) and now building my first app on my own which is going great, but I need some advice regarding user applied filters and how to handle this.

Quick summary of what needs to be done.

The user should be able to set some filters so only certain data is displayed and this state is saved even after closing the application, user logs in again and still sees only the data that is filtered because of the filter option he/she set before.

In one of my courses I got an introduction into Redux and my question here is should I use Redux for this feature or maybe Context for this ? My data is fetched from Firestore and I'm able to use a query to filter data from firestore but that just ends up in many read/writes which cost money.

All advice is more than welcome!


Solution

  • use redux when you need some static state globally in your app then use context like open close drawer etc. For dynamic states go for redux