tsx
import { mount(alias) function mount(fn: () => JSX.Element, el: MountableElement): (() => void) | undefined
import mount
, StartClient(alias) function StartClient(): JSX.Element
import StartClient
} from "@solidjs/start/client";
mount(alias) mount(fn: () => JSX.Element, el: MountableElement): (() => void) | undefined
import mount
(() => <StartClient(alias) function StartClient(): JSX.Element
import StartClient
/>, document[MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/document)
var document: Document
.getElementByIdReturns a reference to the first object with the specified value of the ID attribute.
(method) Document.getElementById(elementId: string): HTMLElement | null
("app")!);
tsx
import { mount(alias) function mount(fn: () => JSX.Element, el: MountableElement): (() => void) | undefined
import mount
, StartClient(alias) function StartClient(): JSX.Element
import StartClient
} from "@solidjs/start/client";
mount(alias) mount(fn: () => JSX.Element, el: MountableElement): (() => void) | undefined
import mount
(() => <StartClient(alias) function StartClient(): JSX.Element
import StartClient
/>, document[MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/document)
var document: Document
.getElementByIdReturns a reference to the first object with the specified value of the ID attribute.
(method) Document.getElementById(elementId: string): HTMLElement | null
("app")!);
This file does one thing. It starts your SolidStart application in the browser. It does so by passing in our <StartClient>
to a mount
function that also takes our mount element as an argument. What is mount
? It is an alias over Solid's hydrate
and render
methods to ensure that no matter what the client always starts up properly.
It doesn't matter if you are using SolidStart to do client-only rendering or if you are using our various modes of server-side rendering. This file is good place to run any other client specific code that you want to happen on startup. Things like registering service workers.
tsx
import { mount(alias) function mount(fn: () => JSX.Element, el: MountableElement): (() => void) | undefined
import mount
, StartClient(alias) function StartClient(): JSX.Element
import StartClient
} from "@solidjs/start/client";
mount(alias) mount(fn: () => JSX.Element, el: MountableElement): (() => void) | undefined
import mount
(() => <StartClient(alias) function StartClient(): JSX.Element
import StartClient
/>, document[MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/document)
var document: Document
.getElementByIdReturns a reference to the first object with the specified value of the ID attribute.
(method) Document.getElementById(elementId: string): HTMLElement | null
("app")!);
tsx
import { mount(alias) function mount(fn: () => JSX.Element, el: MountableElement): (() => void) | undefined
import mount
, StartClient(alias) function StartClient(): JSX.Element
import StartClient
} from "@solidjs/start/client";
mount(alias) mount(fn: () => JSX.Element, el: MountableElement): (() => void) | undefined
import mount
(() => <StartClient(alias) function StartClient(): JSX.Element
import StartClient
/>, document[MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/document)
var document: Document
.getElementByIdReturns a reference to the first object with the specified value of the ID attribute.
(method) Document.getElementById(elementId: string): HTMLElement | null
("app")!);
Component that wraps our application root.