Documentation
¶
Overview ¶
Package root contains the routes and page components for the "/" section.
Package root contains the routes and page components for the "/" section.
Package root contains the routes and page components for the "/" section.
Package root contains the routes and page components for the "/" section. It is a "segment" — a self-contained group of related pages under one path model.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func About ¶
About renders the about page (matched on "/about"). Receives the writable path source so it could update the URL if needed.
func Landing ¶
Landing renders the home/landing page (matched on "/"). Receives the writable path source so it could update the URL if needed.
func Routes ¶
func Routes() doors.SourceRoute[doors.Location]
Routes returns the route group for the Root path model. The app passes it to its top-level doors.Route call, so the segment's pages render in the same container as the rest of the app's routes.
RouteModel[path.Root] matches when the URL decodes into path.Root, and the routes inside it work on the decoded model:
- RootLanding renders the Landing component
- RootAbout renders the About component
RouteSource hands each page a writable doors.Source[path.Root]; updating it encodes the new model back into the URL.
A page renders once when its branch is entered and is replaced only when a different branch should show. If the URL decodes into path.Root but no route inside matches, the group falls through to the app's next route.
Types ¶
This section is empty.