@aslan-hooks/use-local-storage

1.1.1 • Public • Published

use-local-storage

A React Hook for using local storage and keeping it in sync with your app

Installation Instructions

yarn add @aslan-hooks/use-local-storage

or

npm i --save @aslan-hooks/use-local-storage

Usage Instructions

import React from 'react';

import useLocalStorage from '@aslan-hooks/use-local-storage';

const Component = () => {
  const [text, setText] = useLocalStorage('initialValue');

  return (
    <input type="text" value={text} onChange={e => setText(e.target.value)} />
  )
};

Dependents (0)

Package Sidebar

Install

npm i @aslan-hooks/use-local-storage

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

118 kB

Total Files

6

Last publish

Collaborators

  • deniztetik