S
SolidJS16mo ago
Max

Explicit Routing (opt out of file based)

Hi, wondering what the options for routing in solid-start are? I've seen around (for example https://start.solidjs.com/api/Outlet#rendering-the-matched-child-route-component-inside-a-layout-route-component) you can have a routes files, is this complimentary to file based routing, should they match somehow? Can routes be explicitly set (route=>component)? For some context, say for example I have many files that each export a Record of string and component, then I would like to create a route for each member of this record from each file Thanks
SolidStart Beta Docuentation
SolidStart Beta Documentation
Early release documentation and resources for SolidStart Beta
3 Replies
jesseb34r
jesseb34r16mo ago
if you want to opt out of file-based routing, don't use the fileroutes component and define routes using solid-router like normal. You do lose some of the start-specific functionality like routeData though. you can do layout routes with file routing though so if that's all you're looking for you don't need to opt out I believe the example is showing what the generated routes file would look like if you were using the filerouting naming scheme?
Max
Max16mo ago
nice one! thanks for explaining that🔥
jesseb34r
jesseb34r16mo ago
of course!
Want results from more Discord servers?
Add your server
More Posts
Adding eventListener in an onMount shows error in consoleI created a form ref and added an event listener in a component with tsx ´´´ let formRef; . . . refetch not changing the signal of the createResourcewhen trying to update the data of the signal of a resource it didn't update. I have the same issue wStuck in 'rendering index.html' in solid-start buildHello, when I run build in my project, it seems to be stuck on rendering index.html. Any possible reHandle union type in storeHi peeps, I would like to store union type like this `type Post = NewPost | DeletedPost;` in a storPassing For Id between InputGroup and Input using childrenI'm trying to pass create a JSX structure like: ``` <InputGroup label="Email" error="that's not Are there any guarantees on the order of createMemo / createComputed execution when siblings?This example suggests there are none: https://playground.solidjs.com/anonymous/32dc8fda-6b7d-40df-8ccreateMemo with `equals: false` not reactive when mutating referenceI am trying to prevent to create `DOMMatrix` with each calculation, so I thought to mutate 1 with `cHow to have an effect that does not subscribe to the signal's values?I have this effect: https://github.com/nikitavoloboev/kuskus/blob/main/src/components/Page.tsx#L15 multiple sitesdoes solid start support multiple sites (on different domains) but with one node instance? is there createResource mutations / page stateHello, For I'm using createResource for my solid-start project for fetching post user can interact