dad2vad / svr

Home Page:https://svr-wheat.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optimistic UI

One-Click Deploy

Deploy your own SWR project with Vercel.

Deploy with Vercel

How to Use

Download the example:

curl https://codeload.github.com/vercel/swr/tar.gz/master | tar -xz --strip=2 swr-master/examples/optimistic-ui
cd optimistic-ui

Install it and run:

yarn
yarn dev
# or
npm install
npm run dev

Deploy it to the cloud with now (download)

now

The Idea behind the Example

Example of how to use SWR to implement an Optimistic UI pattern where we mutate the cached data immediately and then trigger a revalidation with the API.

About

https://svr-wheat.vercel.app


Languages

Language:JavaScript 100.0%