Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend zustand for global state management #715

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion react-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand All @@ -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/
Expand Down