Back to Swr

Axios TypeScript

examples/axios-typescript/README.md

2.4.1641 B
Original Source

Axios TypeScript

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/axios-typescript
cd axios-typescript

Install it and run:

bash
yarn
yarn dev
# or
npm install
npm run dev

The Idea behind the Example

Show how to use the basic axios along with TypeScript to type both the request object and the data received from SWR.