You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im using immer middleware and modified redux middleware that binds dispatch to every action on initialization .
When other devs want to reset state then they will do something like this:
case 'RESET':
return defaultState;
But now dispatch is not bind to actions anymore
Locking is probably impossible? But can someone give me an hint how to write middleware or edit redux or immer middleware to check if 'actions' belongs to modified set attributes so i could bind dispatch again ?
Edit: Can close this issue. Solution was just not to keep actions in state. const [useStore, actions ] = ....
The text was updated successfully, but these errors were encountered:
I need to lock initial state attribute so that other developers are unable to overwrite it. How could i do that?
Lets say i have state like this:
Im using immer middleware and modified redux middleware that binds dispatch to every action on initialization .
When other devs want to reset state then they will do something like this:
But now dispatch is not bind to actions anymore
Locking is probably impossible? But can someone give me an hint how to write middleware or edit redux or immer middleware to check if 'actions' belongs to modified set attributes so i could bind dispatch again ?
Edit: Can close this issue. Solution was just not to keep actions in state.
const [useStore, actions ] = ....
The text was updated successfully, but these errors were encountered: