Content pfp
Content
@
https://opensea.io/collection/dev-21
0 reply
0 recast
2 reactions

0xbhaisaab pfp
0xbhaisaab
@0xbhaisaab
psa for any dev who is working on a canvas game inside a nextjs miniapp boilerplate. checkout zustand, super simple state management library from the maker of react-three-fiber.
1 reply
0 recast
5 reactions

daksh  pfp
daksh
@dakshk.eth
if you want an atomic state management then try using jotai as well, same creator
1 reply
0 recast
0 reaction

0xbhaisaab pfp
0xbhaisaab
@0xbhaisaab
it's less about atomic management, and more for its getstate() pattern. in animation/game loops, react's usestate values get locked in closures when the loop starts. zustand lets you access fresh state values at any point during rendering sharing an example to explain this point better
1 reply
0 recast
0 reaction

daksh  pfp
daksh
@dakshk.eth
I see, I was just randomly talking about state management, didn't know how games faced these issues. you learn something new everyday!
0 reply
0 recast
1 reaction