Time to grep all projects for
const [isBrowser, setIsBrowser] = useState(false)
useEffect(() => {
setIsBrowser(true)
})
and
export function isBrowser() {
return typeof window !== 'undefined'
}
Docs for React's new 𝚋𝚛𝚘𝚠𝚜𝚎𝚛() API are now live! It's available in Canary.
Pass it to 𝚞𝚜𝚎() and it suspends to the closest Suspense boundary on the server, then renders normally in the browser.
Looking forward to this in stable React!
react.dev/reference/reac…






