react-scrollbars-custom icon indicating copy to clipboard operation
react-scrollbars-custom copied to clipboard

mobileNative causes page in NextJS to fuddle up during hot reload

Open stevenmunro opened this issue 4 years ago • 4 comments

I have the Scrollbars HOC wrapping the site. Works well. I may have come across an edge case.

_app.js

<Scrollbar noDefaultStyles noScrollX> <Component {...pageProps} /> </Scrollbar>

If I had mobileNative as a prop, a hot reload in NextJS returns a fuddled up page with native scrollbars. Fuddled up meaning, the page styles appear to inherit elements at the top as if there were a missing closing tag somewhere.

What is the expected behavior?

Adding mobileNative should not affect hot-reload in NextJS.

"next": "^9.4.4", "react": "^16.13.1", "react-scrollbars-custom": "^4.0.25",

stevenmunro avatar Jun 19 '20 07:06 stevenmunro

Can you provide an example? I literally have no idea how could it happen

xobotyi avatar Jun 22 '20 10:06 xobotyi

Hi also get this issue. I have the exact same scenario as @stevenmunro. I have tried providing a true value to mobileNative only for mobile to tablet screen sizes but it doesn't work. I will say that this has only been an issue with Next.js.

Sagecorgi avatar Aug 12 '20 00:08 Sagecorgi

Since im not a Next.js user i barely able to fix it without any preconfigured sandbox.

xobotyi avatar Aug 12 '20 06:08 xobotyi

It is not difficult to set up a barebones NextJS project. https://nextjs.org/learn/basics/create-nextjs-app

I believe this has more to do with mobileNative not working in the first instance.

stevenmunro avatar Aug 12 '20 22:08 stevenmunro