Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FAQ on React Native support #216

Merged
merged 1 commit into from Nov 23, 2022

Conversation

blwinters
Copy link
Contributor

This revises the FAQ to describe that React Native is largely supported, as discussed in this issue.

@kettanaito I see that you have an unmerged branch docs/react-native. Is that up to date? Can it be merged soon too?

@vercel
Copy link

vercel bot commented Oct 17, 2022

@blwinters is attempting to deploy a commit to the MSW Team on Vercel.

A member of the Team first needs to authorize it.

@soroushm
Copy link

soroushm commented Nov 7, 2022

@kettanaito is it posible to merge this pr it has useful information on it

@ClementeSerrano
Copy link

ClementeSerrano commented Nov 11, 2022

hi guys. Can we merge this PR? Is very important to consider for development!

docs/faq.mdx Outdated

Since React Native does not execute in a browser environment, you cannot run a Service Worker alongside your application.
Since React Native does not execute in a browser environment, you will need to add polyfills to patch some of the browser API, by adding `react-native-url-polyfill` and `import { setupServer } from 'msw/native'`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good mention but the reason you need the URL polyfill is not related to the browser but more to that React Native doesn't support certain Node.js globals, like URL. @blwinters, do you think rephrasing this would work?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The msw/native module is, basically, msw/node with different interceptors and some build option tweaks.

Copy link
Member

@kettanaito kettanaito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, folks. I've had some time off, thus this issue didn't get the attention it deserves.

I've reviewed the changes, thanks for submitting this! I've had only one comment to rephrase why you need the URL polyfill. I'd appreciate your opinion on the wording I suggested.

@blwinters
Copy link
Contributor Author

@kettanaito Sorry for the delay in taking care of this, but I've updated my PR with the phrasing changes you requested. Let me know if there is anything else.

@kettanaito
Copy link
Member

Thanks for this improvement, @blwinters! 👏 Welcome to contributors.

@kettanaito kettanaito merged commit 44086ae into mswjs:master Nov 23, 2022
@blwinters blwinters deleted the docs/react-native-faq branch November 23, 2022 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants