Skip to content

Commit 1d90d01

Browse files
committed
Update docs: fix missing unused import in escape-hatches.md and separating-events-from-effects.md
1 parent 2859efa commit 1d90d01

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/content/learn/escape-hatches.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ All code inside Effects is *reactive.* It will run again if some reactive value
343343

344344
```js
345345
import { useState, useEffect } from 'react';
346-
import { createConnection, sendMessage } from './chat.js';
346+
import { createConnection } from './chat.js';
347347
import { showNotification } from './notifications.js';
348348

349349
const serverUrl = 'https://localhost:1234';
@@ -472,7 +472,7 @@ This is not ideal. You want to re-connect to the chat only if the `roomId` has c
472472
```js
473473
import { useState, useEffect } from 'react';
474474
import { experimental_useEffectEvent as useEffectEvent } from 'react';
475-
import { createConnection, sendMessage } from './chat.js';
475+
import { createConnection } from './chat.js';
476476
import { showNotification } from './notifications.js';
477477

478478
const serverUrl = 'https://localhost:1234';

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ Play with this example and see if you can spot the problem with this user experi
281281
282282
```js
283283
import { useState, useEffect } from 'react';
284-
import { createConnection, sendMessage } from './chat.js';
284+
import { createConnection } from './chat.js';
285285
import { showNotification } from './notifications.js';
286286

287287
const serverUrl = 'https://localhost:1234';
@@ -465,7 +465,7 @@ Verify that the new behavior works as you would expect:
465465
```js
466466
import { useState, useEffect } from 'react';
467467
import { experimental_useEffectEvent as useEffectEvent } from 'react';
468-
import { createConnection, sendMessage } from './chat.js';
468+
import { createConnection } from './chat.js';
469469
import { showNotification } from './notifications.js';
470470

471471
const serverUrl = 'https://localhost:1234';
@@ -1442,7 +1442,7 @@ Your Effect knows which room it connected to. Is there any information that you
14421442
```js
14431443
import { useState, useEffect } from 'react';
14441444
import { experimental_useEffectEvent as useEffectEvent } from 'react';
1445-
import { createConnection, sendMessage } from './chat.js';
1445+
import { createConnection } from './chat.js';
14461446
import { showNotification } from './notifications.js';
14471447

14481448
const serverUrl = 'https://localhost:1234';
@@ -1583,7 +1583,7 @@ To fix the issue, instead of reading the *latest* `roomId` inside the Effect Eve
15831583
```js
15841584
import { useState, useEffect } from 'react';
15851585
import { experimental_useEffectEvent as useEffectEvent } from 'react';
1586-
import { createConnection, sendMessage } from './chat.js';
1586+
import { createConnection } from './chat.js';
15871587
import { showNotification } from './notifications.js';
15881588

15891589
const serverUrl = 'https://localhost:1234';
@@ -1720,7 +1720,7 @@ To solve the additional challenge, save the notification timeout ID and clear it
17201720
```js
17211721
import { useState, useEffect } from 'react';
17221722
import { experimental_useEffectEvent as useEffectEvent } from 'react';
1723-
import { createConnection, sendMessage } from './chat.js';
1723+
import { createConnection } from './chat.js';
17241724
import { showNotification } from './notifications.js';
17251725

17261726
const serverUrl = 'https://localhost:1234';

0 commit comments

Comments
 (0)