13 Replies
When user navigates to notifications I want them to see a sidebar meaning Account component and as a props.children I want to have Notifications component
lowercase 'A'
what is the current status?
Its the same
Is there any component that I should import from solid like <Outlet> that react-router-dom has?
There used to be
Outlet
but it was removed in favor of props.children
OK could You look at the file structure I might have problems there
your layout files with
()
should be lowercase I think
they have to match the same name as the folderI can't make it work do you have an example?
or documentation about it
I think something like this
I just wrapped the notification component code into the Account component and it works but I don't really know if this is recommended, as long as it works lol.
Thanks @REEEEE
In case it wasn't clear from the previous example
If you need to be more specifc
Renaming Index
Nested Layout
Some people expect the layout to be collocated with the nested content similar to what Next.js chose to do with their
layout.ts
& page.ts
.
SolidStart on the other hand chose to mirror the route component structure, e.g.
Nesting Routesfor tsx, what is the correct type for the props of the layout?
GitHub
solid-router/src/types.ts at 098a7947ae24f85d05bde76bf26d5c803ae90a...
A universal router for Solid inspired by Ember and React Router - solidjs/solid-router
GitHub
solid/packages/solid/src/render/component.ts at 1afe035c80f0dc28159...
A declarative, efficient, and flexible JavaScript library for building user interfaces. - solidjs/solid