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

Conversation

MalcolmTomisin
Copy link

  • Zustand has a similar API to Redux (Selectors etc)
  • Way less boilerplate
  • Growing popularity as Redux's gets limited to legacy codebases
  • New projects get set up with new generation state managers (Tanstack-query, Valtio, MST, Zustand)
  • Zustand is lighweight, lightweight is important for React Native
  • Performant with transient updates that don't cause re-renders

@pangolingo
Copy link

Is the mobile team using Zustand a lot? I've never worked with it. I'd love to see how we're using it on our client work.

@MalcolmTomisin
Copy link
Author

MalcolmTomisin commented Sep 20, 2024

@pangolingo I don't think there has been opportunities to experience Zustand on client work. New projects are more likely to use zustand.
We are currently looking at writing a series of React Native and Rails blog posts. Zustand and Redux comparisons may feature in one of those posts.

@pangolingo
Copy link

I suggest that we convert this PR to a draft, and don't merge until until more thoughtbotters have enough first-hand experience to recommend Zustand over Redux.

@codeofdiego
Copy link

Hi @pangolingo, yeah I like that suggestion. Ideally, we should get more experience with Zustand and adoption on client projects before changing the guide. @MalcolmTomisin I really liked the idea of writing a blog post about comparing both.

@MalcolmTomisin MalcolmTomisin marked this pull request as draft September 27, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants