Mock(모의 데이터)을 만들어서 활용하는 방식
통상적으로 data fetch
를 해야하는 경우 통신을 통해 응답을 내려주는 서버가 있어야 함
서버가 없는 경우, api 요청으로 내려올 데이터를 프론트에서 모킹하거나 서버의 역할을 해주는 무언가가 필요
API mocking of the next generation
Mock by intercepting requests on the network level. Seamlessly reuse the same mock definition for testing, development, and debugging.
npm install msw --save-dev
# or
yarn add msw --dev