Client

mount

Edit this page

mount is a method that calls either hydrate (server rendering) or render (client rendering) depending on the configuration. It is used in entry-client.tsx to bootstrap an application.

import { mount, StartClient } from "@solidjs/start/client";
mount(() => <StartClient />, document.getElementById("app")!);

If you set { ssr: false } in the defineConfig, effectively deactivating hydration, then mount becomes the same as render.


Parameters

Proptypedescription
fn() => JSX.ElementFunction that returns the application code.
elMountableElementDOM Element to mount the application to
Report an issue with this page