mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 12:13:11 +00:00
[Beta] Add missing dependencies (#5220)
This commit is contained in:
@@ -796,6 +796,22 @@ With `useEvent`, there is no need to "lie" to the linter, and the code works as
|
||||
|
||||
<Sandpack>
|
||||
|
||||
```json package.json hidden
|
||||
{
|
||||
"dependencies": {
|
||||
"react": "experimental",
|
||||
"react-dom": "experimental",
|
||||
"react-scripts": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test --env=jsdom",
|
||||
"eject": "react-scripts eject"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```js
|
||||
import { useState, useEffect } from 'react';
|
||||
import { experimental_useEvent as useEvent } from 'react';
|
||||
|
||||
Reference in New Issue
Block a user