You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using this library with nextjs 14 I'm getting:
Warning: Prop `style` did not match.
Server: "position:absolute;top:0;left:0;right:0;bottom:0;overflow:scroll;-webkit-overflow-scrolling:touch;margin-right:0;margin-bottom:0"
Client: "position:absolute;top:0;left:0;right:0;bottom:0;overflow:scroll;-webkit-overflow-scrolling:touch;margin-right:-15px;margin-bottom:-15px"
anyone run into this issue? Any fix?
The text was updated successfully, but these errors were encountered:
I got it too. In my case, the Scrollbars component is trying to apply a margin-right and margin-bottom of -16px on the client-side, but these styles doesn't apply server-side, thus causing the mismatch. Solution: doing a dynamic import of the scrollbar by using next/dynamics and setting server-side-rendering to off:
// ...import section
import dynamic from 'next/dynamic';
// Dynamically import the Scrollbars component with SSR disabled
const Scrollbars = dynamic(
() => import('react-custom-scrollbars-2').then((mod) => mod.Scrollbars),
{ ssr: false }
);
// your component code below...
When using this library with nextjs 14 I'm getting:
anyone run into this issue? Any fix?
The text was updated successfully, but these errors were encountered: