recoil-nexus
Advanced tools
Comparing version 0.3.4 to 0.3.5
@@ -6,1 +6,2 @@ import { RecoilValue, RecoilState } from 'recoil'; | ||
export declare function setRecoil<T>(atom: RecoilState<T>, valOrUpdater: T | ((currVal: T) => T)): void; | ||
export declare function resetRecoil(atom: RecoilState<any>): void; |
@@ -20,2 +20,6 @@ import { useRecoilCallback } from 'recoil'; | ||
}, []); | ||
nexus.reset = useRecoilCallback(function (_a) { | ||
var reset = _a.reset; | ||
return reset; | ||
}, []); | ||
return null; | ||
@@ -32,2 +36,5 @@ } | ||
} | ||
export function resetRecoil(atom) { | ||
nexus.reset(atom); | ||
} | ||
//# sourceMappingURL=RecoilNexus.js.map |
{ | ||
"name": "recoil-nexus", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"description": "A small Typescript package to access your Recoil atoms outside of React components.", | ||
@@ -5,0 +5,0 @@ "main": "build/RecoilNexus.js", |
@@ -52,2 +52,3 @@ # R E C O I L - N E X U S | ||
| `setRecoil` | setter function, pass value to be set as second parameter | | ||
| `resetRecoil` | pass atom as parameter to reset to default value | | ||
@@ -54,0 +55,0 @@ ```tsx |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
7705
110
92