Comparing version 1.0.0-beta.3 to 1.0.0-beta.4
@@ -36,4 +36,4 @@ import React,{useState,useRef,useCallback,useEffect,useContext,useMemo}from'react';const shallowEqual = require("fbjs/lib/shallowEqual"); | ||
if (nextWatchState !== lastWatchState) { | ||
listener(nextWatchState, currentState, lastWatchState); | ||
lastWatchState = nextWatchState; | ||
listener(nextWatchState, currentState, lastWatchState); | ||
} | ||
@@ -49,4 +49,4 @@ }; | ||
if (nextWatchState !== lastWatchState) { | ||
store._updateStateWithoutReaction(produce(currentState, s => reaction(nextWatchState, s, currentState, lastWatchState))); | ||
lastWatchState = nextWatchState; | ||
store._updateStateWithoutReaction(produce(currentState, s => reaction(nextWatchState, s, currentState, lastWatchState))); | ||
} | ||
@@ -53,0 +53,0 @@ }; |
@@ -36,4 +36,4 @@ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});function _interopDefault(e){return(e&&(typeof e==='object')&&'default'in e)?e['default']:e}var React=require('react'),React__default=_interopDefault(React);const shallowEqual = require("fbjs/lib/shallowEqual"); | ||
if (nextWatchState !== lastWatchState) { | ||
listener(nextWatchState, currentState, lastWatchState); | ||
lastWatchState = nextWatchState; | ||
listener(nextWatchState, currentState, lastWatchState); | ||
} | ||
@@ -49,4 +49,4 @@ }; | ||
if (nextWatchState !== lastWatchState) { | ||
store._updateStateWithoutReaction(produce(currentState, s => reaction(nextWatchState, s, currentState, lastWatchState))); | ||
lastWatchState = nextWatchState; | ||
store._updateStateWithoutReaction(produce(currentState, s => reaction(nextWatchState, s, currentState, lastWatchState))); | ||
} | ||
@@ -53,0 +53,0 @@ }; |
{ | ||
"name": "pullstate", | ||
"version": "1.0.0-beta.3", | ||
"version": "1.0.0-beta.4", | ||
"description": "Simple state stores using immer and React hooks", | ||
@@ -59,2 +59,4 @@ "main": "dist/index.js", | ||
"typescript": "^3.5.0-rc", | ||
"react": "^16.8.6", | ||
"react-dom": "^16.8.6", | ||
"webpack": "^4.29.5", | ||
@@ -61,0 +63,0 @@ "webpack-cli": "^3.2.3", |
83423
30