Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions website/versioned_docs/version-30.0/TutorialReact.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@ At Facebook, we use Jest to test [React](https://reactjs.org/) applications.

## Setup

### Setup with Create React App

If you are new to React, we recommend using [Create React App](https://create-react-app.dev/). It is ready to use and [ships with Jest](https://create-react-app.dev/docs/running-tests/#docsNav)! You will only need to add `react-test-renderer` for rendering snapshots.

Run

```bash npm2yarn
npm install --save-dev react-test-renderer
```
:::caution
The **Create React App (CRA)** project is no longer actively maintained. For starting a new React project, we recommend using modern tools such as **[Vite](https://vitejs.dev/)** or **[Next.js](https://nextjs.org/)**, which often include their own recommended Jest setup. Please refer to their documentation for the most current configuration instructions.
:::

### Setup without Create React App
### Manual Setup

If you have an existing application you'll need to install a few packages to make everything work well together. We are using the `babel-jest` package and the `react` babel preset to transform our code inside of the test environment. Also see [using babel](GettingStarted.md#using-babel).

Expand Down
Loading