From 0a5b997a11be3df042b92cb02d0c3973a96adbba Mon Sep 17 00:00:00 2001 From: Tomi Alu Date: Fri, 13 Sep 2024 17:01:52 +0100 Subject: [PATCH] chore: Recommend zustand for global state management --- react-native/README.md | 2 +- react/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/react-native/README.md b/react-native/README.md index 4f9b8041..89bc9c8e 100644 --- a/react-native/README.md +++ b/react-native/README.md @@ -15,7 +15,7 @@ * Use [React Navigation](https://reactnavigation.org/) for routing * Use [TanStack React Query](https://tanstack.com/query/v4/docs/framework/react/overview) as an API client for REST APIs * Use [Apollo Client](https://www.apollographql.com/docs/react/) as an API client for GraphQL APIs -* Use [Redux Toolkit](https://redux-toolkit.js.org/) for global state +* Use [Zustand](https://github.com/pmndrs/zustand) for global state * Avoid storing API data in a global store. Instead, use a dedicated API client. * Use [React Native Firebase](https://rnfirebase.io/) for push notifications * Use [Sentry](https://docs.sentry.io/platforms/react-native/) for error reporting diff --git a/react/README.md b/react/README.md index 05ea8df0..40bbf57b 100644 --- a/react/README.md +++ b/react/README.md @@ -15,7 +15,7 @@ - Prefer the `children` prop over [render props] - Prefer using [TypeScript prop interfaces] over [PropTypes] - Prefer the [short syntax] when using [Fragments] -- Prefer [React Contexts] over [Redux] +- Prefer [React Contexts] over [Zustand] when a trivial amount of values that don't get updated often need to be available to other components - Avoid using indexes as the value for [keys] - Prefer [component composition over component inheritance] @@ -35,7 +35,7 @@ [short syntax]: https://reactjs.org/docs/fragments.html#short-syntax [fragments]: https://reactjs.org/docs/fragments.html [react contexts]: https://reactjs.org/docs/context.html -[redux]: https://react-redux.js.org/ +[zustand]: https://github.com/pmndrs/zustand [keys]: https://reactjs.org/docs/lists-and-keys.html#keys [component composition over component inheritance]: https://reactjs.org/docs/composition-vs-inheritance.html [react router]: https://reacttraining.com/react-router/