Carlo Nyte
Is it possible to get createAsync to revaluate/ refetch data like createResource?
I ended up not needing to refetch because I could use the data in the ui to get the value I needed. (I was added data to a list and was thinking of using refetch/ revalidate to get the new number of items in the list but its faster just to add the new item to the existing length of list to get the total
9 replies
How to use load property of <Route>
@peerreynders sorry if this is obvious, but is the advantage of using the
cache
function is that it actually caches the data so that if the user goes back to the page/ component again there won't be another request made to the server?15 replies
Possible Bug with routeData
Got it. I understand now.
routeData
is a reserved word that works in accordance with useRouteData
. I didn't understand that from the documentation. I thought routeData was just random variable name and not something unique. I wonder if there's a way to express that better, or if I'm just an outlier and it's clear to everyone else.
In any case, thank you for taking the time to explain it10 replies
Possible Bug with routeData
Gotcha. What I was trying to do was what i saw done in the Movies example:
https://github.com/solidjs/solid-start/tree/main/examples/movies
10 replies
Possible Bug with routeData
I can get the data from function
routeData
to work in the componentA in file ComponentA.tsx
Which is great!
But
1) If I try to move export function routeData({ params }: RouteDataArgs<{id:string}>)
into it's own file the code will break.
2) If I change the name of routeData
to anything besides routeData the code will break.
Neither of which make sense to me10 replies