In this video we’ll use MSW (Mock Service Worker) to mock HTTP requests both on the browser but also on the server during SSR (Server Side Rendering) in Next.js

---------- Links

MSW - https://mswjs.io/
SWR - https://swr.vercel.app/
Finished code: https://github.com/leighhalliday/msw-mocked-api

---------- Timeline

  • 00:00 - Introduction
  • 02:25 - Mocking on the client
  • 05:00 - Next Level Next.js
  • 05:40 - Back to Mocking on the client
  • 15:15 - Mocking on the server

#react #api

Mocking APIs During Development in React
26.95 GEEK