Skip to content

Commit 6055885

Browse files
committed
Add back package.json with third-party deps
1 parent b6a3778 commit 6055885

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

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

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,23 @@ Verify that the new behavior works as you would expect:
439439
440440
<Sandpack>
441441
442+
```json package.json hidden
443+
{
444+
"dependencies": {
445+
"react": "latest",
446+
"react-dom": "latest",
447+
"react-scripts": "latest",
448+
"toastify-js": "1.12.0"
449+
},
450+
"scripts": {
451+
"start": "react-scripts start",
452+
"build": "react-scripts build",
453+
"test": "react-scripts test --env=jsdom",
454+
"eject": "react-scripts eject"
455+
}
456+
}
457+
```
458+
442459
```js
443460
import { useState, useEffect } from 'react';
444461
import { useEffectEvent } from 'react';
@@ -1307,6 +1324,23 @@ Your Effect knows which room it connected to. Is there any information that you
13071324
13081325
<Sandpack>
13091326
1327+
```json package.json hidden
1328+
{
1329+
"dependencies": {
1330+
"react": "latest",
1331+
"react-dom": "latest",
1332+
"react-scripts": "latest",
1333+
"toastify-js": "1.12.0"
1334+
},
1335+
"scripts": {
1336+
"start": "react-scripts start",
1337+
"build": "react-scripts build",
1338+
"test": "react-scripts test --env=jsdom",
1339+
"eject": "react-scripts eject"
1340+
}
1341+
}
1342+
```
1343+
13101344
```js
13111345
import { useState, useEffect } from 'react';
13121346
import { useEffectEvent } from 'react';
@@ -1431,6 +1465,23 @@ To fix the issue, instead of reading the *latest* `roomId` inside the Effect Eve
14311465
14321466
<Sandpack>
14331467
1468+
```json package.json hidden
1469+
{
1470+
"dependencies": {
1471+
"react": "latest",
1472+
"react-dom": "latest",
1473+
"react-scripts": "latest",
1474+
"toastify-js": "1.12.0"
1475+
},
1476+
"scripts": {
1477+
"start": "react-scripts start",
1478+
"build": "react-scripts build",
1479+
"test": "react-scripts test --env=jsdom",
1480+
"eject": "react-scripts eject"
1481+
}
1482+
}
1483+
```
1484+
14341485
```js
14351486
import { useState, useEffect } from 'react';
14361487
import { useEffectEvent } from 'react';
@@ -1551,6 +1602,23 @@ To solve the additional challenge, save the notification timeout ID and clear it
15511602
15521603
<Sandpack>
15531604
1605+
```json package.json hidden
1606+
{
1607+
"dependencies": {
1608+
"react": "latest",
1609+
"react-dom": "latest",
1610+
"react-scripts": "latest",
1611+
"toastify-js": "1.12.0"
1612+
},
1613+
"scripts": {
1614+
"start": "react-scripts start",
1615+
"build": "react-scripts build",
1616+
"test": "react-scripts test --env=jsdom",
1617+
"eject": "react-scripts eject"
1618+
}
1619+
}
1620+
```
1621+
15541622
```js
15551623
import { useState, useEffect } from 'react';
15561624
import { useEffectEvent } from 'react';

0 commit comments

Comments
 (0)