@airma/react-state
Advanced tools
Comparing version 15.3.1 to 15.4.0
@@ -86,6 +86,7 @@ // src/index.ts | ||
const context = useContext(ReactStateContext); | ||
const paddingRef = useRef(activeRequiredModels(value)); | ||
const storeRef = useRef(activeRequiredModels(value)); | ||
const selector = useMemo(() => { | ||
return { ...paddingRef.current, parent: context }; | ||
}, [context]); | ||
const store = storeRef.current.update(value); | ||
return { ...store, parent: context }; | ||
}, [context, value]); | ||
return createElement( | ||
@@ -92,0 +93,0 @@ ReactStateContext.Provider, |
{ | ||
"name": "@airma/react-state", | ||
"version": "15.3.1", | ||
"version": "15.4.0", | ||
"module": "dist/index.js", | ||
@@ -40,3 +40,3 @@ "typings": "index.d.ts", | ||
"react-dom": ">=16.8.0", | ||
"@airma/core": "^15.3.0" | ||
"@airma/core": "^15.4.0" | ||
}, | ||
@@ -43,0 +43,0 @@ "devDependencies": { |
@@ -320,2 +320,4 @@ [![npm][npm-image]][npm-url] | ||
Suggest using this API with async state mangement library like [react-query](https://tanstack.com/query/v4). | ||
### useRefresh | ||
@@ -336,2 +338,4 @@ | ||
Suggest using this API with async state mangement library like [react-query](https://tanstack.com/query/v4). | ||
### requireModels | ||
@@ -338,0 +342,0 @@ |
22213
124
191
468
Updated@airma/core@^15.4.0