Closed rodbs closed 2 years ago
i believe this is a duplicate of #51
if you use setSlug it would work for now, as shown in the docs
but yeah i need to fix this
setSlug
? where is that in the docs?
you mean create an state variable and store route.params.slug?
setSlug(route.params.slug)
I mean use the setter from the useParam
docs:
const [slug, setSlug] = useParam('slug')
// and then...
setSlug('123')
But this will be fixed when I have time.
What I mean is, if you update slug via that setSlug
function, it'll work for now.
ok , I understand. Thx!!
closing as duplicate of #51
I've got a blog/[slug].js structure
In react navigation I have
In the Blog screen I have:
So, first time a select a post,
slug
keeps the right value and same thing forroute.params.slug
. But next times,route.params.slug
stores the right value whileslug
keeps storing the first selected (it's not updated). Is it a bug ?