reactjs / react.dev

The React documentation website
https://react.dev/
Creative Commons Attribution 4.0 International
11k stars 7.51k forks source link

Document behaviour of setting state inside `useLayoutEffect` #7096

Closed OliverJAsh closed 1 month ago

OliverJAsh commented 1 month ago

As discussed: https://github.com/facebook/react/issues/17334#issuecomment-2272162502

@eps1lon You will probably have a better idea of how to word this. I was also wondering if we should add a note under "Measuring layout before the browser repaints the screen". This is exactly what I was trying to achieve before realising the behaviour with regards to useEffect.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
19-react-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2024 9:33am
react-dev ✅ Ready (Inspect) Visit Preview Aug 7, 2024 9:33am
github-actions[bot] commented 1 month ago

Size changes

## 📦 Next.js Bundle Analysis for react-dev This analysis was generated by the [Next.js Bundle Analysis action](https://github.com/hashicorp/nextjs-bundle-analysis). 🤖 This PR introduced no changes to the JavaScript bundle! 🙌