@rooks/use-sessionstorage
Advanced tools
Comparing version 4.0.0-canary.13 to 4.0.0-canary.14
@@ -13,2 +13,8 @@ 'use strict'; | ||
} | ||
/** | ||
* useSessionstorage | ||
* Tracks a value within sessionStorage and updates it | ||
* @param key Key of the value to be stored | ||
* @param defaultValue Default value of the stored item | ||
*/ | ||
function useSessionstorage(key, defaultValue = null) { | ||
@@ -15,0 +21,0 @@ const [value, dispatch] = react.useReducer(reducer, getValueFromSessionStorage()); |
@@ -11,2 +11,8 @@ import { useReducer, useEffect, useCallback } from 'react'; | ||
} | ||
/** | ||
* useSessionstorage | ||
* Tracks a value within sessionStorage and updates it | ||
* @param key Key of the value to be stored | ||
* @param defaultValue Default value of the stored item | ||
*/ | ||
function useSessionstorage(key, defaultValue = null) { | ||
@@ -13,0 +19,0 @@ const [value, dispatch] = useReducer(reducer, getValueFromSessionStorage()); |
@@ -13,2 +13,8 @@ 'use strict'; | ||
} | ||
/** | ||
* useSessionstorage | ||
* Tracks a value within sessionStorage and updates it | ||
* @param key Key of the value to be stored | ||
* @param defaultValue Default value of the stored item | ||
*/ | ||
function useSessionstorage(key, defaultValue = null) { | ||
@@ -15,0 +21,0 @@ const [value, dispatch] = react.useReducer(reducer, getValueFromSessionStorage()); |
@@ -11,2 +11,8 @@ import { useReducer, useEffect, useCallback } from 'react'; | ||
} | ||
/** | ||
* useSessionstorage | ||
* Tracks a value within sessionStorage and updates it | ||
* @param key Key of the value to be stored | ||
* @param defaultValue Default value of the stored item | ||
*/ | ||
function useSessionstorage(key, defaultValue = null) { | ||
@@ -13,0 +19,0 @@ const [value, dispatch] = useReducer(reducer, getValueFromSessionStorage()); |
@@ -15,2 +15,8 @@ (function (global, factory) { | ||
} | ||
/** | ||
* useSessionstorage | ||
* Tracks a value within sessionStorage and updates it | ||
* @param key Key of the value to be stored | ||
* @param defaultValue Default value of the stored item | ||
*/ | ||
function useSessionstorage(key, defaultValue = null) { | ||
@@ -17,0 +23,0 @@ const [value, dispatch] = react.useReducer(reducer, getValueFromSessionStorage()); |
@@ -15,4 +15,10 @@ interface StorageHandlerAsObject { | ||
} | ||
/** | ||
* useSessionstorage | ||
* Tracks a value within sessionStorage and updates it | ||
* @param key Key of the value to be stored | ||
* @param defaultValue Default value of the stored item | ||
*/ | ||
declare function useSessionstorage(key: string, defaultValue?: any): StorageHandler; | ||
export default useSessionstorage; |
@@ -28,3 +28,3 @@ { | ||
], | ||
"version": "4.0.0-canary.13", | ||
"version": "4.0.0-canary.14", | ||
"_id": "@rooks/use-sessionstorage@", | ||
@@ -37,3 +37,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "1a03bfd9508cad01ae31703141966f931f7f237a" | ||
"gitHead": "e82b49d1447d2dbd62f21c9af2c6b1c4e42b79f3" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
19058
459