Skip to content

Commit

Permalink
[RELEASE] v.2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Gading Nasution committed Dec 19, 2022
1 parent 08a3064 commit 2245ca8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swr-global-state",
"version": "2.1.0",
"version": "2.1.1",
"author": "Sutan Gading Fadhillah Nasution <contact@gading.dev>",
"description": "Zero-setup & simple global state management for React Components",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/swr-global-state/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "swr-global-state",
"author": "Sutan Gading Fadhillah Nasution <contact@gading.dev>",
"description": "Zero-setup & simple global state management for React Components",
"version": "2.1.0",
"version": "2.1.1",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/swr-global-state/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function useStore<T, E = any>(data: StoreParams<T>, swrConfig?: SWRConfig
export function createStore<T, E = any>(data: StoreParams<T>, swrConfig?: SWRConfiguration) {
return (initial?: T) => useStore<T, E>({
...data,
initial: initial || data.initial
initial: initial ?? data.initial
}, swrConfig);
}

Expand Down

0 comments on commit 2245ca8

Please sign in to comment.