-
Notifications
You must be signed in to change notification settings - Fork 50
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
[Next.js] Hydration failed #123
Comments
It is not "fixable" in the sense that the server has no viewport. You will not be able to work around this so you basically can either ignore it or not use a masonry layout. |
You can do something like this to avoid the error on Next.js - vercel/next.js#35773 (comment) |
I had the same issue, here is how I fixed that: 'use client'
export default function App () {
const [isServerSide, setIsServerSide] = React.useState(true)
React.useEffect(() => {
setIsServerSide(false)
}, [])
if (isServerSide) {
return
}
// the rest of your code
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a problem using this lib in the latest Next.js and latest React.js.
This is the error I'm getting:
Followed by:
Not sure what I can do to fix this. I searched through issues and nobody seemed to complain about using it on Next/SSR.
The text was updated successfully, but these errors were encountered: