Server-side rendering

Designs created with Plasmic work great with server-side rendering. However, some of the Plasmic code uses randomly generated IDs, and it is important that these IDs generated on the server match up with what is on the client during React hydration.

If you are using the Headless API, this is already taken care of for you. But if you are using codegen directly, you’ll need to make sure to wrap your root with PlasmicRootProvider, like so:

Copy
import { PlasmicRootProvider } from '@plasmicapp/react-web';
function MyApp() {
return <PlasmicRootProvider>{/* your app here! */}</PlasmicRootProvider>;
}

Give feedback on this page