1.0.15 • Published 5 months ago

react-storage-helper v1.0.15

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

react-storage-helper

A custom React hook for managing data from localStorage easily.

npm version

Installation

npm install react-storage-helper

Usage

import React from 'react';
import useLocalStorage from 'react-storage-helper';

const MyComponent = () => {
  const [data, setData, deleteData] = useLocalStorage('mySecret');

  return (
    <div>
      <p>Data from localStorage: {data}</p>
      <button onClick={() => setData('new value')}>Update Data</button>
      <button onClick={deleteData}>Delete Data</button>
    </div>
  );
};

export default MyComponent;
1.0.15

5 months ago

1.0.14

5 months ago

1.0.13

5 months ago

1.0.12

5 months ago

1.0.11

5 months ago

1.0.10

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago