How do you mock APIs in React Native?
Help the community by voting for the API mocking tool you use in React Native projects.
Privacy: We store a salted SHA-256 hash of your IP plus the poll ID, your option and the time. That's pseudonymous, not anonymous. Deduplication is per IP: one vote per network per poll. Hashes are deleted after 90 days. A network can vote again after 90 days.
The voting API runs on Cloudflare Workers with a D1 database. Votes are rate-limited per IP. Results are shown only after you vote. VPNs and network changes allow extra votes, and a shared IP gets only one vote. Results are informal.
Disclosure: The maintainer of this site (Sebastian) is the author of Mockifyer, one of the options in this poll. "Other" and "I don't mock APIs" are listed last to avoid bias.
About the Options
MirageJS
Intercepts fetch and XHR in the JavaScript runtime. In-memory database simulation for building complete frontend applications.
Mockifyer
Record/replay HTTP mocking for axios and fetch, with JSON mocks in your repo. Supports React Native/Expo via device storage and optional Metro sync. (Built by the site's maintainer.)
Mockoon
Local mock API server with GUI or CLI. Runs as a separate server; point your app's base URL at it (Android emulator: use 10.0.2.2).
MSW (Mock Service Worker)
Network-level HTTP interception using Service Workers in browsers and native Node.js modules. In React Native: MSW 2's msw/native with polyfills ("use at your own risk"). MSW 3 removed it, and @msw/react-native isn't on npm yet (checked 2026-10-15).
Polly.js
Record, replay, and stub HTTP interactions. Built by Netflix, works with multiple adapters including Fetch, XHR, and Node HTTP. Its docs don't cover React Native.
Prism
Generate mock servers directly from OpenAPI specifications with dynamic examples and validation. Runs as a separate server; point the app's base URL at it (Android emulator: 10.0.2.2).
Note: Nock isn't included because it's Node-only: it works in Jest tests, not on a device or simulator.