Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
remix-run-bot committed Oct 14, 2022
1 parent f0518cc commit 5f3cfb7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/routers/picking-a-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ If you're not interested in the data APIs, you can continue to use [`<BrowserRou
Testing components that use React Router APIs is easiest with [`createMemoryRouter`][creatememoryrouter] or [`<MemoryRouter>`][memoryrouter] instead of the routers you use in your app that require DOM history APIs.

Some of the React Router APIs internally use `fetch`, which is only supported starting from Node.js v18. If your project uses v17 or lower, you should add a `fetch` polyfill manually. One way to do that, is to install [`whatwg-fetch`](https://www.npmjs.com/package/whatwg-fetch) and add it to your `jest.config.js` file like so:

```js
module.exports = {
setupFiles: ['whatwg-fetch'],
setupFiles: ["whatwg-fetch"],
// ...rest of the config
}
};
```

## React Native
Expand Down

0 comments on commit 5f3cfb7

Please sign in to comment.