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

chore: migrate to valtio state #119

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

dai-shi
Copy link
Member

@dai-shi dai-shi commented Jun 12, 2021

This PR is to use valtio instead of zustand. It tries to keep the difference small for now.
We could organize actions and hooks in store.js in the future.
(I was originally hoping to use useProxy macro, but wasn't able to work with vite. not sure why.)

@vercel
Copy link

vercel bot commented Jun 12, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pmndrs/racing-game/Hm8kuFapYjQVYPcbZ3NMNYij8xgi
✅ Preview: https://racing-game-git-chore-migrate-to-valtio-state-pmndrs.vercel.app

@promontis
Copy link

@dai-shi could you elaborate why you are migrating to valtio instead of zustand?

@dai-shi
Copy link
Member Author

dai-shi commented Jun 22, 2021

See #117.

Code would be simplified. Could optimize re-renders. (assuming humans make mistakes in manual render optimization.)

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.

None yet

3 participants