react-hooks-crocode

Collections of useful react-hooks

Usage no npm install needed!

<script type="module">
  import reactHooksCrocode from 'https://cdn.skypack.dev/react-hooks-crocode';
</script>

README

react-hooks

A collection of useful react-hooks

Install

npm install --save react-hooks-crocode

Use

import { useLocalStorage } from 'react-hooks-crocode';

const MyComponent = (props) => {
  const [token, setToken] = useLocalStorage('TOKEN'); // by default, token = null
}

Hooks

useSessionStorage

useLocalStorage