coffeebeats f54469551f
fix(middleware/persist): ensure argument for onRehydrateStorage and onHydrate is defined on first hydration (#1692)
* add tests ensuring that onRehydrateStorage is always passed the latest state

* fix persist to always pass latest state to onRehydrateStorage and onHydrate listeners

* document that tests for onHydrate during first hydration are not possible

* ensure state updates during onHydrate are reflected in onRehydrateStorage callback

* undo modifications to persist's old implementation
2023-03-31 22:11:17 +09:00
..