-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating state with useSearchParams on Select component causes multiple reenders #1738
Closed
1 of 3 tasks
Comments
2023-11-17.11-06-22.mp4 |
Also, it would be cool seeing an example of integrating Ark and Nextjs with url on state |
I looked into this deeply today and found that it's a Next.js bug vercel/next.js#43691 In the meantime, you can use the good'ol const handleChange = (details) => {
const params = new URLSearchParams(searchParams)
params.set('city', value[0])
// workaround until Next.js fix
window.history.pushState(
{},
'',
`/search-param?${params.toString()}`
)
}
} |
But how do I read from the url with Nextjs? It would cause hydration problems |
I opened an issue on Nextjs: vercel/next.js#58684 |
Closed
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When using Nexjjs's useSearchParams hook with Select component causes multiple reenders.
Link to Reproduction (or Detailed Explanation)
https://use-search-param-ark.vercel.app/search-param
Steps to Reproduce
Ark UI Version
1.0.0
Framework
Browser
Chrome
Additional Information
GitHub Repo: https://github.com/juliomuhlbauer/use-search-param-ark
The text was updated successfully, but these errors were encountered: