-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Update! I managed to make it work with this
buuut now there is another problem in my home page I have a slider with the brands and it is supposed to sent you to http://localhost:3000/tienda?brands=QUIMECO it does, but "QUIMECO" appears 1 second and then vanish |
Beta Was this translation helpful? Give feedback.
-
In your original post you show code using React's Note that since you're working with arrays, the import { useQueryState, parseAsArrayOf, parseAsString } from 'next-usequerystate'
const [brands, setBrands] = useQueryState(
'brands',
parseAsArrayOf(parseAsString)
.withDefault([brands])
) |
Beta Was this translation helpful? Give feedback.
In your original post you show code using React's
useState
, could you show us the relevantuseQueryState
hook please?Note that since you're working with arrays, the
parseAsArrayOf
parser may help with query string formatting here: