cannot use useParams data in a useEffect hook!
When I use
const {channelId} = Route.useParams()
It seems that channelId
does not update when I listen to it in a useEffect
hook
4 Replies
fair-rose•16mo ago
Can you show a reproduction of this please by forking one of the examples. Thanks 🙏
passive-yellowOP•16mo ago
Oh no I just realized what I did........ I'm freezing the context on the parent that's why
fair-rose•16mo ago
huh what's that?
passive-yellowOP•16mo ago
Well I'm animating my routes which requires freezing the context so that <Outlet/> doesn't change. It's a whole complicated system I came up with but I just fixed my issue!