Support responsive breakpoints #50748
monolithed
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
I won't blame Next.js here as the That said, regarding your issue you should consider to:
import { useEffect, useState } from 'react';
import { Grid } from 'antd';
const MyComponent = () => {
const [render, setRender] = useState(false);
const screens = Grid.useBreakpoint();
useEffect(() => {
setRender(true);
}, []);
if (render === false) {
return null;
}
return <div>{JSON.stringify(screens)}</div>
};
export default MyComponent; |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi everyone, I'm facing the same issue. Has a solution been found for this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
It would be nice to implement something like @solid-primitives/media and @artsy/fresnel out of the box.
Background
Currently, due to hydration issues, it's impossible to use responsive libraries effectively, just like the standard Grid.useBreakpoint from Ant Design and other.
We need a solution because developing responsive applications with Next.js is extremely difficult. I regret the time I spent investigating this problem, which shouldn't exist in the first place. I don't need SSR, but I've spent three days trying to fix issues related to this type of rendering.
Screen.Recording.2023-06-03.at.20.54.35.mov
2.mov
Proposal
Please remove SSR if it hinders application development or support responsive system out of the box
Beta Was this translation helpful? Give feedback.
All reactions