Migrate state management from Redux to Jotai
Last updated
Was this helpful?
Last updated
Was this helpful?
There are really a lot of codes. Dig in each files to check the detail.
reducers
actions
component
Provider with store to wrap around .
It's much simple. I only initialize the default state value, then just call with useAtom()
Basically, both reducers and actions are not necessary any more.
Use atom to load data. Move away the code to load from Component.
Define store
State in the component
Provider with store to wrap around .