S
SolidJS16mo ago
Revxrsal

useParams() not changing when switching pages?

i'm getting really odd behavior
export default function EditRoutine() {
const params = useParams();
createEffect(() => {
console.log("Params")
console.log(params)
})
return <></>
export default function EditRoutine() {
const params = useParams();
createEffect(() => {
console.log("Params")
console.log(params)
})
return <></>
"Params" only gets printed once, when going to the dynamic route for the first time. after that it stops changing. any idea?
3 Replies
Tommypop
Tommypop16mo ago
You've got to access a property on the params object for it to track Such as: params.id
Revxrsal
RevxrsalOP16mo ago
ah i see. that works now thanks question, do history.back()/history.go(...) play nicely with solid router? or do they cause bugs?
Tommypop
Tommypop16mo ago
AFAIK they should play nicely I haven't actually tested myself before
Want results from more Discord servers?
Add your server