Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-hooks-global-state

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hooks-global-state - npm Package Compare versions

Comparing version 0.3.2 to 0.4.0

4

CHANGELOG.md

@@ -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);

5

package.json
{
"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);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc