headlessui icon indicating copy to clipboard operation
headlessui copied to clipboard

Dialog Re-Render on Next.JS fast refresh

Open dl-web-dev opened this issue 4 years ago • 1 comments

What package within Headless UI are you using? @headlessui/react

What version of that package are you using? v1.7.4

What browser are you using? Chrome

Describe your issue If you have a Dialog open, every time you make a change in Next.JS and it triggers a fast refresh, another Dialog element is added to the DOM regardless of the dialog already being open.

Screenshot 2022-11-17 at 9 45 19 AM

Doing a hard refresh seems to remove the duplicates but not sure if there is another way to fix this that will stop them from re-rendering every single fast refresh.

dl-web-dev avatar Nov 17 '22 15:11 dl-web-dev

Hey! Thank you for your bug report! Much appreciated! 🙏

Unfortunately, I have to close this as a reproduction was not provided. Trying to create a reproduction ourselves from the information in an issue drastically increases the amount of time it takes for us to provide a solution and if we have do that for every issue it’s impossible for us to keep up.

If this is still an issue for you, please open a new issue but include a proper reproduction GitHub repository or CodeSandbox where you already have everything all set up so we can clone it and immediately see the issue without configuring everything by hand.

Sorry, not trying to be dismissive and definitely want to fix the issue if there is one, but we have to be strict about this one or there's no way we could keep up with the number of questions we get and the quality of the library would suffer as a result. Hope that's understandable!

RobinMalfait avatar Nov 17 '22 23:11 RobinMalfait