open-index/open-npm huggingface dataset:
npm package: @preetibissoyi/use-local-storage
Description: A reusable React Hook for syncing state with localStorage.
Author: Your Name
Latest version: 1.0.0

# use-local-storage

A reusable React Hook for syncing state with `localStorage`.

## Installation

```bash
npm install use-local-storage
```

## Usage

```tsx
import { useLocalStorage } from 'use-local-storage';

function Counter() {
  const [count, setCount] = useLocalStorage('count', 0);
  return (
    <button onClick={() => setCount(count + 1)}>
      Count: {count}
    </button>
  );
}
```

## Features
- Syncs state with `localStorage`
- Fully typed with generics
- Handles SSR (safe for Next.js, etc.)
- JSON serialization for complex values

## License
MIT