Releases: colorfy-software/zfy
Releases · colorfy-software/zfy
Release 1.0.0
1.0.0 (2022-02-14)
- chore!: bump minimal zustand version (916a039)
- refactor!: simplify
createStore()
type signature (e4b9867) - refactor!: use an array to provide stores to
useRehydrate()
/<PersistGate/>
(5f751c5) - feat!: switch to zustand official persistence middleware (3b29dd6)
- refactor!: remove lazy rehydration (55e6a96)
Features
- add example app (eb3a5c0)
- add store name to
createStore()
returned object (e82fe1f) - implement
initStores()
(f8e0b1b) - implement
store.subscribeWithSelector()
(dc019b6) - update example (41091c6)
- update
initStores()
docs & tests (d933ae3)
BREAKING CHANGES
- Updated the minimal zustand version accepted by zfy from 3.0.0 to 3.6.0.
createStore<StoresDataType, StoreNameType>()
has been simplified tocreateStore<StoreDataType>()
. In other words,createStore()
only care about receiving the type of its data directly and nothing else anymore.- Now that each store can return its name (
store.getState().name
), we can switch from objects to using an array to provide stores touseRehydrate()
/<PersistGate />
. - The persistence feature will now be bound the zustand persistence middleware API itself. zfy's solution has been built when zustand did not provide that ability. Therefore, it has no reason to still exist now. This change also lead to the removal of
initZfy()
method as its not required anymore. - Remove the lazy rehydration feature for now as it's not properly working