kobweb icon indicating copy to clipboard operation
kobweb copied to clipboard

Investigate / document issues with `rememberBreakpoint` and exporting

Open bitspittle opened this issue 2 years ago • 1 comments

If you use ComponentStyle + breakpoints in your Kobweb project, you should get a clean responsive design when you open your page either using mobile or desktop.

Instead, if you rely on rememberBreakpoints too much, what can happen is your site exports with a desktop-sized width, generates such a layout, and then if you load the site on mobile, you'll get a "desktop" snapshot until the JS finishes loading, kicking in, and rerendering the site.

I need to look into this to 1) verify this is happening and 2) find a better way to communicate this to users (maybe via the README and code docs?)

bitspittle avatar Sep 15 '23 15:09 bitspittle

Possibly we should let people configure the export width. See https://www.lambdatest.com/support/docs/playwright-test-execution-setup/#:~:text=The%20default%20viewport%20size%20for,shown%20in%20the%20code%20below.

bitspittle avatar Sep 15 '23 16:09 bitspittle