@vorlefan/react-hooks
Advanced tools
Comparing version 1.0.9 to 1.1.0
@@ -683,2 +683,13 @@ import { useState, useMemo, useCallback, useEffect } from 'react'; | ||
var _useClient = useClient(), | ||
inServer = _useClient.inServer; | ||
if (inServer) return { | ||
get: null, | ||
set: function set(value) { | ||
return false; | ||
}, | ||
state: null | ||
}; | ||
var _useState = useState(!!localStorage.getItem(key) ? JSON.parse(localStorage.getItem(key)) : JSON.stringify(value)), | ||
@@ -685,0 +696,0 @@ _useState2 = _slicedToArray(_useState, 2), |
@@ -687,2 +687,13 @@ 'use strict'; | ||
var _useClient = useClient(), | ||
inServer = _useClient.inServer; | ||
if (inServer) return { | ||
get: null, | ||
set: function set(value) { | ||
return false; | ||
}, | ||
state: null | ||
}; | ||
var _useState = react.useState(!!localStorage.getItem(key) ? JSON.parse(localStorage.getItem(key)) : JSON.stringify(value)), | ||
@@ -689,0 +700,0 @@ _useState2 = _slicedToArray(_useState, 2), |
{ | ||
"name": "@vorlefan/react-hooks", | ||
"version": "1.0.9", | ||
"version": "1.1.0", | ||
"description": "Useful react hooks for React & Next.js app", | ||
@@ -5,0 +5,0 @@ "author": "DaxSoft", |
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
164769
1947