Restrict React DOM imports from Server Components (#27382)
Adds a separate entry point for the react-dom package when it's accessed from a Server Component environment, using the "react-server" export condition. When you're inside a Server Component module, you won't be able to import client-only APIs like useState. This applies to almost all React DOM exports, except for Float ones like preload.
A
Andrew Clark committed
2d2f2af29bc3175530a158bc90189fc6f12f7855
Parent: d6dcad6
Committed by GitHub <noreply@github.com>
on 9/15/2023, 6:53:19 PM