Error in Next.js 12
rijk opened this issue · comments
When using <ScrollerMotion>
in my Next.js project, I get the following error in the console:
Warning: Prop `style` did not match. Server: "null" Client: "position:fixed;left:0;top:0;right:0;bottom:0"
It's also not working properly because the div is missing the fixed styles.
Also should be fixed in the 1.1.0
release, let me know if any issues 🙂
I have same problem in next 13
import { isMobile } from 'react-device-detect';
import { ScrollerMotion } from 'scroller-motion';
<ScrollerMotion disabled={isMobile}>
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{
duration: 1,
}}
className='text-gray-950'
>
<div className='flex-1 '>
<Header />
<div>{children}</div>
<Footer />
</div>
</motion.div>
</ScrollerMotion>