Skip to content

Commit 1a49812

Browse files
committed
Clarify conflicting advice
1 parent d7d5533 commit 1a49812

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/hooks-faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ If we just wanted to set an interval, we wouldn't need the ref (`id` could be lo
156156
// ...
157157
```
158158

159-
Conceptually, you can think of refs as similar to instance variables in a class. Avoid setting refs during rendering -- this can lead to surprising behavior. Instead, only modify refs in event handlers and effects.
159+
Conceptually, you can think of refs as similar to instance variables in a class. Unless you're doing [lazy initialization](#how-to-create-expensive-objects-lazily), avoid setting refs during rendering -- this can lead to surprising behavior. Instead, typically you want to modify refs in event handlers and effects.
160160

161161
### Should I use one or many state variables?
162162

0 commit comments

Comments
 (0)