react-hooks-global-state
Advanced tools
Comparing version 0.3.2 to 0.4.0
@@ -5,2 +5,6 @@ # Change Log | ||
## [0.4.0] - 2018-12-03 | ||
### Changed | ||
- Fix Initialization bug (#2) | ||
## [0.3.0] - 2018-11-12 | ||
@@ -7,0 +11,0 @@ ### Changed |
@@ -62,2 +62,8 @@ "use strict"; | ||
if (globalState !== initialState) { | ||
// globalState is updated during the initialization | ||
// Note: there could be a better way for this | ||
setState(globalState); | ||
} | ||
var cleanup = function cleanup() { | ||
@@ -64,0 +70,0 @@ var index = listeners.indexOf(setState); |
{ | ||
"name": "react-hooks-global-state", | ||
"description": "Simple global state for React by Hooks API", | ||
"version": "0.3.2", | ||
"version": "0.4.0", | ||
"author": "Daishi Kato", | ||
@@ -34,3 +34,4 @@ "repository": { | ||
"examples:immer": "DIR=10_immer webpack-dev-server", | ||
"examples:deep": "DIR=11_deep webpack-dev-server" | ||
"examples:deep": "DIR=11_deep webpack-dev-server", | ||
"examples:effect": "DIR=12_effect webpack-dev-server" | ||
}, | ||
@@ -37,0 +38,0 @@ "keywords": [ |
@@ -6,3 +6,3 @@ react-hooks-global-state | ||
[![npm version](https://badge.fury.io/js/react-hooks-global-state.svg)](https://badge.fury.io/js/react-hooks-global-state) | ||
![bundle size](https://badgen.net/bundlephobia/minzip/react-hooks-global-state) | ||
[![bundle size](https://badgen.net/bundlephobia/minzip/react-hooks-global-state)](https://bundlephobia.com/result?p=react-hooks-global-state) | ||
@@ -114,2 +114,3 @@ Simple global state for React by Hooks API | ||
[11](https://codesandbox.io/s/github/dai-shi/react-hooks-global-state/tree/master/examples/11_deep) | ||
[12](https://codesandbox.io/s/github/dai-shi/react-hooks-global-state/tree/master/examples/12_effect) | ||
@@ -116,0 +117,0 @@ Limitations |
@@ -41,2 +41,7 @@ import { | ||
listeners.push(setState); | ||
if (globalState !== initialState) { | ||
// globalState is updated during the initialization | ||
// Note: there could be a better way for this | ||
setState(globalState); | ||
} | ||
const cleanup = () => { | ||
@@ -43,0 +48,0 @@ const index = listeners.indexOf(setState); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
26433
432
129
0