Skip to content

Entry

The dreamkit entry allows you to programmatically define routes in a single file.

It can be used as an optional alternative to the file routing system and both can work together at the same time. In addition, it has an advanced tree shaking system that separates each route with its dependencies and is compatible with HMR.

All examples shown in the documentation make use of this mechanic to more easily illustrate the code.

Example

/src/dreamkit.tsx
import { $route } from "dreamkit";
export const homeRoute = $route.path("/").create(() => {
return <>hello world</>;
});