| title | app.tsx |
|---|
The App component is the isomorphic (shared on server and browser) entry point into your application.
This is where the code runs on both sides.
This is like the classic entry point where you can define your router, and other top level components.
This is where routers setup navigation between the pages discovered by the FileRouter.
import { A, Router } from "@solidjs/router";
import { FileRoutes } from "@solidjs/start/router";
import { Suspense } from "solid-js";
export default function App() {
return (
<Router
root={(props) => (
<A href="/">Index</A>
<A href="/about">About</A>
<Suspense>{props.children}</Suspense>
)}
>
<FileRoutes />
</Router>
);
}See a similar example in StackBlitz
Since SolidStart does not come packaged with a router, you can simply return your template of choice:
export default function App() {
return (
<main>
<h1>Hello world!</h1>
</main>
);
}See this example in StackBlitz