-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Conversation
@blwinters is attempting to deploy a commit to the MSW Team on Vercel. A member of the Team first needs to authorize it. |
@kettanaito is it posible to merge this pr it has useful information on it |
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'`. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
0edbdb1
to
ac524f0
Compare
@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. |
Thanks for this improvement, @blwinters! 👏 Welcome to contributors. |
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?