Skip to content

Commit 31e63de

Browse files
committed
add back package.json for more toastify deps
1 parent f2b6c8e commit 31e63de

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

src/content/learn/escape-hatches.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,23 @@ This is not ideal. You want to re-connect to the chat only if the `roomId` has c
452452

453453
<Sandpack>
454454

455+
```json package.json hidden
456+
{
457+
"dependencies": {
458+
"react": "latest",
459+
"react-dom": "latest",
460+
"react-scripts": "latest",
461+
"toastify-js": "1.12.0"
462+
},
463+
"scripts": {
464+
"start": "react-scripts start",
465+
"build": "react-scripts build",
466+
"test": "react-scripts test --env=jsdom",
467+
"eject": "react-scripts eject"
468+
}
469+
}
470+
```
471+
455472
```js
456473
import { useState, useEffect } from 'react';
457474
import { useEffectEvent } from 'react';

src/content/learn/removing-effect-dependencies.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,6 +1784,24 @@ Another of these functions only exists to pass some state to an imported API met
17841784
17851785
<Sandpack>
17861786
1787+
1788+
```json package.json hidden
1789+
{
1790+
"dependencies": {
1791+
"react": "latest",
1792+
"react-dom": "latest",
1793+
"react-scripts": "latest",
1794+
"toastify-js": "1.12.0"
1795+
},
1796+
"scripts": {
1797+
"start": "react-scripts start",
1798+
"build": "react-scripts build",
1799+
"test": "react-scripts test --env=jsdom",
1800+
"eject": "react-scripts eject"
1801+
}
1802+
}
1803+
```
1804+
17871805
```js src/App.js
17881806
import { useState } from 'react';
17891807
import ChatRoom from './ChatRoom.js';
@@ -2062,6 +2080,24 @@ As a result, the chat re-connects only when something meaningful (`roomId` or `i
20622080
20632081
<Sandpack>
20642082
2083+
2084+
```json package.json hidden
2085+
{
2086+
"dependencies": {
2087+
"react": "latest",
2088+
"react-dom": "latest",
2089+
"react-scripts": "latest",
2090+
"toastify-js": "1.12.0"
2091+
},
2092+
"scripts": {
2093+
"start": "react-scripts start",
2094+
"build": "react-scripts build",
2095+
"test": "react-scripts test --env=jsdom",
2096+
"eject": "react-scripts eject"
2097+
}
2098+
}
2099+
```
2100+
20652101
```js src/App.js
20662102
import { useState } from 'react';
20672103
import ChatRoom from './ChatRoom.js';

src/content/learn/reusing-logic-with-custom-hooks.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,23 @@ export function showNotification(message, theme = 'dark') {
10611061
}
10621062
```
10631063
1064+
```json package.json hidden
1065+
{
1066+
"dependencies": {
1067+
"react": "latest",
1068+
"react-dom": "latest",
1069+
"react-scripts": "latest",
1070+
"toastify-js": "1.12.0"
1071+
},
1072+
"scripts": {
1073+
"start": "react-scripts start",
1074+
"build": "react-scripts build",
1075+
"test": "react-scripts test --env=jsdom",
1076+
"eject": "react-scripts eject"
1077+
}
1078+
}
1079+
```
1080+
10641081
```css
10651082
input { display: block; margin-bottom: 20px; }
10661083
button { margin-left: 10px; }

0 commit comments

Comments
 (0)