Skip to content

Feedback: Browser integration #387

Discussion options

You must be logged in to vote

Sharing my original response on Discord below.

Hi!
First things first,

I don't know how I can run the server to mock my data.

You don't run servers with MSW. It either works in the browser alongside your app (https://mswjs.io/docs/integrations/browser), or in your server's process (https://mswjs.io/docs/integrations/node). Pick one or choose both at the same time.

I checked the examples but no one is using React

Here's an example that is using React:
https://github.com/mswjs/examples/tree/main/examples/with-remix

There's really nothing specific you should know in order to integrate MSW into a React project. The integration is almost the same in any framework, and the only thing that c…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kettanaito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants