Releases: suhaotian/use-one
Releases · suhaotian/use-one
v1.4.3
v1.4.2
v1.4.1
- Feat: export
emitPersistReady
andonPersistReady
utils
Full Changelog: v1.4.0...v1.4.1
v1.4.0-beta.4
- Fix:
isReady
always false after clean
Full Changelog: v1.4.0-beta.3...v1.4.0-beta.4
v1.4.0-beta.3
- Feat: add usePersist hook to persist any hooks's state
Full Changelog: v1.4.0-beta.2...v1.4.0-beta.3
v1.4.0
Beta finally end, publish v1.4.0 🥳
New features compare to v1.1.1:
- Feat: Add
persistStore
to persist your store - Feat: Add
usePersist
to persist react hook's state - Chore(README): README reorganize and code reorganize, now it's more make sense 💪
Full Changelog: v1.1.1...v1.4.0
v1.4.0-beta.2
What's Changed
- Remove eventemitter3 by @suhaotian in #4
Full Changelog: v1.4.0-beta.1...v1.4.0-beta.2
v1.4.0-beta.1
- Fix:
persistStore
wrong when cahce data is null - Refactor(examples): refactor examples use new style
v1.4.0-beta.0
- Feat:
persistStore
support React Native / Expo
Usage:
import { create, persistStore, wrapState, isClient } from 'use-one';
const initialState = wrapState({ count: 0 }); // -> { ready: false, count: 0 }
const [use, store] = create(initialState);
console.log('isClient', isClient);
isClient && persistStore(store, { key: '@CACHE_KEY', debounce: 100 });
v1.3.0-beta.3
- Feat: add
transform: state => state
topersistStore
's options