react-use
react-use copied to clipboard
New Hook: useEncryptedSessionStorage
Is your feature request related to a problem? Please describe.
Some of my projects requires useSessionStorage hooks but with storage encryption.
Describe the solution you'd like
useEncryptedSessionStorage that extends useSessionStorage hook with storage encryption with the help of encrypt-storage package by michelonsouza.
Usage of the hook would be like:
const [state, setState] = useEncryptedSessionStorage({
secretKey: "mySecretKey",
key: "state1"
});
Describe alternatives you've considered
Creating my own custom useEncryptedSessionStorage. I realized that someone else might need to use something like this, so I decided that maybe I can contribute to react-use for this hook.
Awesome!. would you like to add it in my repository?