Skip to content

Releases: mayan-sharma/use-everything

1.0.3

20 Oct 16:32
Compare
Choose a tag to compare

Introduced useCookie hook.

const { cookie, setCookie, removeCookie } = useCookie(cookie, value);

Usage

import { useCookie } from "use-everything";

function App() {

  const { cookie, setCookie, removeCookie } = useCookie('balle', 'shava');

  return (
    <div>
      {JSON.stringify(cookie)}
      <button onClick={() => setCookie('bhature')}>Set</button>
      <button onClick={removeCookie}>Remove</button>
    </div>
  );
}

export default App;