@spark-ui/use-combined-state
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.6.1](https://github.com/adevinta/spark/compare/@spark-ui/use-combined-state@0.6.0...@spark-ui/use-combined-state@0.6.1) (2023-09-29) | ||
### Bug Fixes | ||
- doc ([5506203](https://github.com/adevinta/spark/commit/55062039dc67c3532be42a4661540052094163d9)) | ||
- **use-combined-state:** doc ([9ea6c28](https://github.com/adevinta/spark/commit/9ea6c2820c4578daafb394c8242207b5465129a8)) | ||
- **use-combined-state:** missed var observed in hook ([b3fc647](https://github.com/adevinta/spark/commit/b3fc647c5ff679d00f0ce71bd5d4d73fbfc1a2dd)) | ||
# [0.6.0](https://github.com/adevinta/spark/compare/@spark-ui/use-combined-state@0.5.6...@spark-ui/use-combined-state@0.6.0) (2023-09-28) | ||
@@ -8,0 +16,0 @@ |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("lodash.isequal"),c=require("react");exports.useCombinedState=function(r,i,o){const e=r!==void 0,{current:s}=c.useRef(e?r:i),[a,l]=c.useState(i),n=e?r:a,f=c.useCallback((u,b=(t,d)=>!S(t,d))=>{const t=typeof u!="function"?u:u(n);b(n,t)&&!e&&l(t),o&&o(t)},[e,n]);return[n,f,e,s]}; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("lodash.isequal"),i=require("react");exports.useCombinedState=function(r,o,u){const e=r!==void 0,{current:s}=i.useRef(e?r:o),[a,l]=i.useState(o),n=e?r:a,f=i.useCallback((c,b=(t,d)=>!S(t,d))=>{const t=typeof c!="function"?c:c(n);b(n,t)&&!e&&l(t),u&&u(t)},[e,n,u]);return[n,f,e,s]}; |
{ | ||
"name": "@spark-ui/use-combined-state", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "combine controlled-uncontrolled component state by stateful-stateless inner state management", | ||
@@ -43,3 +43,3 @@ "publishConfig": { | ||
"license": "MIT", | ||
"gitHead": "60a8f00aef92177084ac744bc4fd56ef13bc9948" | ||
"gitHead": "de227a8b264be41733e8889fb99f7fa0404efd53" | ||
} |
# useCombinedState | ||
> @spark-ui/use-combined-state | ||
 | ||
 | ||
 | ||
 | ||
[](https://sparkui.vercel.app/?path=/docs/hooks-usecombinedstate--docs) | ||
[](https://sparkui-adv.vercel.app/docs/hooks/useCombinedState) | ||
[](https://github.com/adevinta/spark/issues/new?&projects=4&template=bug-report.yml&assignees=&labels=hook,use-combined-state) | ||
[](https://www.npmjs.com/package/@spark-ui/use-combined-state) | ||
@@ -12,3 +12,3 @@ | ||
 | ||
 | ||
[](https://github.com/adevinta/spark/issues?q=is%3Aopen+label%3Ahook+label%3Ause-combined-state) | ||
[](https://github.com/adevinta/spark/blob/main/packages/hooks/use-combined-state/LICENSE.md) |
Sorry, the diff of this file is not supported yet
10857