Carl (klequis)
I have a use case for createResource vs normal async await api call.
current router version is 0.13.6. I don't know the exact version createAsync was introduced but it was in 0.10.x which was a significant change. The doc has all be updated so maybe consider upgrading if you haven't already.
18 replies
Routing and using special characters with <FileRoutes>
The question relates to a SolidStart routing tutorial I'm writing so no actual deployment. I noticed that the Solid Router doc has this patterns documented but in the
<FileRoutes>
doc they are not. So the question is me questioning if I should include these patterns in the tutorial or not.4 replies
OptionalParams in route not working
Then I am misunderstanding https://docs.solidjs.com/solid-start/building-your-application/routing#optional-parameter
9 replies
OptionalParams in route not working
codesandbox example: https://codesandbox.io/p/github/klequis/solid-routing-optional-params/main?import=true
9 replies
How to use load property of <Route>
I just noticed that your solution using
createResource
in the load
function is listed in the Migration from v0.9.x doc and it suggests that was the way to do it before 10.x 15 replies
How to use load property of <Route>
I have since created two examples. I couldn't get them working on StackBlitz so here they are in github:
https://github.com/klequis/solid-router-load-functions
I find your first example (
I also followed "A common pattern" example from this section of the router README Thank you for your efforts. They have been very educational.
solidjs-templates-h7n8dj
) interesting in the way it differs from my example02 in the above repo. You
- modified the response in fetchPerson
returning only name
,
- then use createResource
in loadPerson
.
- but don't need createAsync
in <Person>
I did neither but did need createAsync
in [id].jsx
(formally Person.jsx
).
I also followed "A common pattern" example from this section of the router README Thank you for your efforts. They have been very educational.
15 replies