Skip to content

Commit ae6147f

Browse files
authored
fix: change experimental_useEvent to experimental_useEffectEvent in escape-hatches.md (#5573)
1 parent 47adefd commit ae6147f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

beta/src/content/learn/escape-hatches.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,14 +471,14 @@ This is not ideal. You want to re-connect to the chat only if the `roomId` has c
471471

472472
```js
473473
import { useState, useEffect } from 'react';
474-
import { experimental_useEvent as useEvent } from 'react';
474+
import { experimental_useEffectEvent as useEffectEvent } from 'react';
475475
import { createConnection, sendMessage } from './chat.js';
476476
import { showNotification } from './notifications.js';
477477

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

480480
function ChatRoom({ roomId, theme }) {
481-
const onConnected = useEvent(() => {
481+
const onConnected = useEffectEvent(() => {
482482
showNotification('Connected!', theme);
483483
});
484484

0 commit comments

Comments
 (0)