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
Tommypop2y ago
You've got to access a property on the params object for it to track Such as: params.id
Revxrsal
RevxrsalOP2y 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
Tommypop2y ago
AFAIK they should play nicely I haven't actually tested myself before
Want results from more Discord servers?
Add your server