From 53391209c460a04d6ec3add5f3c410d555aecf92 Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 21 Mar 2023 23:21:07 +0000 Subject: [PATCH] Add a missing comment --- src/content/learn/lifecycle-of-reactive-effects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/lifecycle-of-reactive-effects.md b/src/content/learn/lifecycle-of-reactive-effects.md index b969cde2..5d9554a1 100644 --- a/src/content/learn/lifecycle-of-reactive-effects.md +++ b/src/content/learn/lifecycle-of-reactive-effects.md @@ -672,7 +672,7 @@ This may look like a React error, but really React is pointing out a bug in your To fix the bug, follow the linter's suggestion to specify `roomId` and `serverUrl` as dependencies of your Effect: ```js {9} -function ChatRoom({ roomId }) { +function ChatRoom({ roomId }) { // roomId is reactive const [serverUrl, setServerUrl] = useState('https://localhost:1234'); // serverUrl is reactive useEffect(() => { const connection = createConnection(serverUrl, roomId);