Back to Swr

Storage Tab Sync

examples/storage-tab-sync/README.md

2.4.1599 B
Original Source

Storage Tab Sync

One-Click Deploy

Deploy your own SWR project with Vercel.

How to Use

Download the example:

bash
curl https://codeload.github.com/vercel/swr/tar.gz/main | tar -xz --strip=2 swr-main/examples/storage-tab-sync
cd storage-tab-sync

Install it and run:

bash
yarn
yarn dev
# or
npm install
npm run dev

The Idea behind the Example

Show how you could use SWR to synchronize localStorage values between tabs.