Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with react.dev @ eb174dd9 #72

Merged
merged 9 commits into from
Mar 6, 2025
Prev Previous commit
Next Next commit
Update components-and-hooks-must-be-pure.md (#7245)
Sanderand authored Oct 23, 2024
commit eb174dd932613fb0784a78ee2d9360554538cc08
Original file line number Diff line number Diff line change
@@ -194,7 +194,7 @@ function ProductDetailPage({ product }) {
}
```

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).
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).

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).