Solid Start Navigation
Hi,
I've got a Solid Start page, and want to navigate to a different page within a component.
I basically do the following:
I have also tried not passing
replace: true
, doesnt change anything though.
The issue I have is this:
The URL changes, as well as the history. But the page content doesn't change, only when I refresh the page.
I guess this has something to do with navigating to the same page essentially, just with different params.
What's the correct way of handeling a navigation like this?
Thanks!
I dont really think it's necessary, but this is what my [provider]/[mensa]/[date].tsx looks like
4 Replies
This seems to be related to this: https://discordapp.com/channels/722131463138705510/1223010243433332776
I'm currently trying to follow what has been discussed there
Turns out it was the exact same problem: this is what I changed in case someone is having a similar problem:
To clarify the bug in your original code,
const date = parseDate(params.date)
loses reactivity on params.date
. If you instead use const date = () => parseDate(params.date)
and use date()
you should be fine.Ahh that makes sense! would it also work to call parseDate in the createAsync directly?
Like this
It should, because it's wrapped in a function there