Next.js Discord

Discord Forum

Responsive design and ssr

Unanswered
Sirex woodwasp posted this in #help-forum
Open in Discord
Sirex woodwaspOP
Hello friends,

I have a simple question when it comes to dealing with SSR and responsive design. I wouldn't say that I'm not totally adding behavioral features, but also removing and maybe adding some JS based on device width.

I'm at the beginning of this journey. What do you guys prefer?
- Using user agent request (which is mostly not preferred since it's not based on specific width and also not usually accurate).
- Should I suspense my client section that's relying on getting the size of the windows ? (this seems kind I cool but I fear I'm laterally way over reaching)
- Or should I use the CSS approach and add some markups (this is also an option) ?

2 Replies

Sirex woodwaspOP
That's amazing the problem that I'm using CSS and for better or worst I might need to add specific JavaScript logic depending on my situation
i'm thinking about us client hints or something like that using them cookies