We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 807e7fa commit 0f8bd80Copy full SHA for 0f8bd80
1 file changed
src/content/reference/react/useMemo.md
@@ -1101,11 +1101,10 @@ function ChatRoom({ roomId }) {
1101
}, [roomId]); // ✅ Only changes when roomId changes
1102
1103
useEffect(() => {
1104
- const options = createOptions();
1105
const connection = createConnection(options);
1106
connection.connect();
1107
return () => connection.disconnect();
1108
- }, [options]); // ✅ Only changes when createOptions changes
+ }, [options]); // ✅ Only changes when options changes
1109
// ...
1110
```
1111
0 commit comments