Rending components based on screen size in next js with parent server component
Unanswered
Rex posted this in #help-forum
RexOP
Here is the situation I have I have a section which is vastly different mobile and desktop version so i created two versions of it and showing them based on the tailwind css break points. The parent is server componet If I switch child components using window size I get hydration error. html rendered different on server.
I don't think the current tailwind css creak point is good plus I think it is effecting the overflow performance. The component some mili seconds to be displayed.
What is the solution/ better way of doing it ?
I did my research but did not find any answer so thats why I am asking here
I don't think the current tailwind css creak point is good plus I think it is effecting the overflow performance. The component some mili seconds to be displayed.
What is the solution/ better way of doing it ?
I did my research but did not find any answer so thats why I am asking here
2 Replies
I don't think there is a better way to do this except tailwindcss breakpoints
RexOP
sigh