Releases: suhaotian/use-one
Releases · suhaotian/use-one
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
v1.3.0-beta.2
- Fix types
v1.3.0-beta.1
**Feat: **
- add persist store, support react-native and web
Usage:
import { create } from 'use-one';
import { persistStore, wrapState, isClient } from 'use-one/persist';
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.2.0-beta.1
- Feat: support server components
Use different entry with 'react-server': './index.js',
inspired from https://www.npmjs.com/package/server-only?activeTab=code
v1.1.1
v1.1.0
Publish v1.0.0
-
Breaking Change:
createOne
rename tocreate
, and deprecated
createOne
-
Breaking Change: remove
setState
please usereplaceState
instead -
remove tsdx and add bunchee
-
remove MAX_UPDATE_COUNT_NUMBER
-
clean types:
syncState
andreplaceState
supportoldState => newState
-
export type createOptions
=>export type CreateOptions
-
add test, e2e tests, and npm auto release github actions
-
update deps and use pnpm
-
add changelog
-
Update README
0.10.1-beta.0 update deps
Now no more manual install eventemitter3
,
And remove tsdk
bundle replace with bunchee
.