Skip to content

Commit eb174dd

Browse files
authored
Update components-and-hooks-must-be-pure.md (#7245)
1 parent e628e5d commit eb174dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/reference/rules/components-and-hooks-must-be-pure.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function ProductDetailPage({ product }) {
194194
}
195195
```
196196

197-
One way to achieve the desired result of updating `window.title` outside of render is to [synchronize the component with `window`](/learn/synchronizing-with-effects).
197+
One way to achieve the desired result of updating `document.title` outside of render is to [synchronize the component with `document`](/learn/synchronizing-with-effects).
198198

199199
As long as calling a component multiple times is safe and doesn’t affect the rendering of other components, React doesn’t care if it’s 100% pure in the strict functional programming sense of the word. It is more important that [components must be idempotent](/reference/rules/components-and-hooks-must-be-pure).
200200

0 commit comments

Comments
 (0)