4 ms·
Really cool stuff. Can you elaborate on how you used Zustand for this?
by mr_ralph 5y ago
Really cool stuff. Can you elaborate on how you used Zustand for this?
- theobr 5y agoGladly :) Zustand is a state management library for React, similar to Redux or Mobx. It’s super minimal, allowing you to configure a single object with values and functions that is shared across the codebase Almost all of the “game logic” lives in a single file that only depends on Zustand: https://github.com/TheoBr/dogecoin-simulator/blob/main/src/engine/game.ts https://github.com/TheoBr/dogecoin-simulator/blob/main/src/e... I am also using Zustand for my job: https://tt.fm https://tt.fm I’ve been super impressed with Zustand’s conciseness and performance. Recently have been impressed with portability too, all our Zustand stores have been copy-pasteable between our React and RN apps :)