Closed gabrielmfern closed 5 months ago
I just tested it out and it seems to work properly logging out the id in the load function
I just tested it out and it seems to work properly logging out the id in the load function
Weird, would there be any reason for this issue possibly being platform specific?
I tested on Mac so maybe its a Linux thing?
I'm pretty sure the id is there but the logging is missing it because of the way the getter is defined.. lets see if there is something we can do about this in the router.
Yeah I think this is just platform to platform. We added ownKeys
and set descriptors to configurable and enumerable. I'm not sure there is much more to be done. Just how proxies console.log
I guess.
Duplicates
Latest version
Current behavior 😯
When trying to receive the parameters from the route inside of the
load
function for theroute
export of a route the parameters come out as empty. Not sure if this was a@solidjs/router
issue or astart
issue, so I'm assuming this is a start issue.This can clearly be seen by just running the hacker-news example and opening up one of the stories.
Expected behavior 🤔
That the parameters properly are passed in the
load
function defined in theexport const route = { ... }
statement.Steps to reproduce 🕹
Steps:
console.log
of theparams
inside of theload
function here https://github.com/solidjs/solid-start/blob/b0428cb03e58dc3e98ec82c8193fd13709a1fb94/examples/hackernews/src/routes/stories/%5Bid%5D.tsx#L6-L10{}
instead of the expected JSON{ "id": "39403189" }
Context 🔦
I'm just trying to cache something the same as the hacker-news example does it, but in my situation it going on like this made it crash as my website wasn't ready to fetch on the client. I understand this is not how I should probably go about implementing this, and I am adding the proper code to handle the fetching on the client, but the load function should come with the proper parameters and this is still a bug.
Your environment 🌎
Running this on Linux with Node 20.10.0