Stop the page, render the page many times
virus231 opened this issue · 1 comments
virus231 commented
Context
What's your version of nuqs
?
-> "nuqs": "^1.17.8",
Next.js information (obtained by running next info
):
Paste result from `next info` here
Are you using:
- ✅ The app router
- ❌ The pages router
- ❌ The
basePath
option in your Next.js config - ❌ The experimental
windowHistorySupport
flag in your Next.js config
Description
const [type, setType] = useQueryState('type', parseAsString)
const {
data: catalog,
isLoading,
isPending,
isError,
} = useQueryCatalogList({
...filters,
type: type || undefined,
city: city || undefined,
})
....
<Card className='mt-4 rounded-[16px] p-4'>
<RadioGroup
color='default'
size='lg'
classNames={{
wrapper: 'flex gap-5 text-default text-[14px] font-lato',
}}
defaultValue={'all'}
orientation='horizontal'
value={type || 'all'}
onValueChange={value =>
value === 'all'
? setType(null)
: setType(value as 'master' | 'salon')
}
>
<Radio
classNames={{
label: 'text-default font-lato text-base',
}}
value={'all'}
>
Все
</Radio>
<Radio
classNames={{
label: 'text-default font-lato text-base',
}}
value='salon'
>
Салоны
</Radio>
<Radio
classNames={{
label: 'text-default font-lato text-base',
}}
value='master'
>
Частные мастера
</Radio>
</RadioGroup>
</Card>
Reproduction
- Go to
onValueChange={value =>
value === 'all'
? setType(null)
: setType(value as 'master' | 'salon')
}
- Click on Master or Salon
- Page is not active, page is stopped
franky47 commented
I think your best bet is in the Telegram-related message being printed many times, I don't see anything wrong with your nuqs usage here.