/data-fetching-fetch-vs-swr

Data Fetching: Conventional Approach vs SWR Approach

Primary LanguageTypeScript

Data Fetching: Fetch API Approach vs SWR Approach

  • First, clone the repo to your local machine,
  • Then run yarn command to install packages and dependencies
  • Thirdly, to start the server type terminal yarn run json-server which is going to be running on 5001 port with 2 seconds of delay ( you can update these through package.json)
  • Finally, run command yarn run dev to see UI on your local machine afterthat visit http://localhost:3000

You can watch an example Youtube Video to see what this repo do.