Skip to content

Commit e21b37c

Browse files
authored
[Beta] Add missing dependencies (#5220)
1 parent f4d42d6 commit e21b37c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

beta/src/content/learn/separating-events-from-effects.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,22 @@ With `useEvent`, there is no need to "lie" to the linter, and the code works as
796796
797797
<Sandpack>
798798
799+
```json package.json hidden
800+
{
801+
"dependencies": {
802+
"react": "experimental",
803+
"react-dom": "experimental",
804+
"react-scripts": "latest"
805+
},
806+
"scripts": {
807+
"start": "react-scripts start",
808+
"build": "react-scripts build",
809+
"test": "react-scripts test --env=jsdom",
810+
"eject": "react-scripts eject"
811+
}
812+
}
813+
```
814+
799815
```js
800816
import { useState, useEffect } from 'react';
801817
import { experimental_useEvent as useEvent } from 'react';

0 commit comments

Comments
 (0)