1.0.5 • Published 5 years ago

@aslan-hooks/use-interval v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

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)} />
  )
};