Open tim-soft opened 5 years ago
No, scrolling is not possible from the getgo because server has no window and i suppose no CSS and styles-related stuff (not sure about CSS - never used an SSR yet).
Anyways, if there is no CSS it is not possible to determine a lot of stuff, due to component uses getComputedStyle
@tim-soft maybe it'll be reasonable to add a prop to make tracks visible from init for situations when you're sure there will be a scrolling - it will minimize the "blink" effect for user. But there is absolutely no way to make it scrollable from the getgo due to lack of CSS on which component is rely.
I think that sounds pretty reasonable. In that case, maybe adding this functionality to permanentTrackX
/permanentTrackY
/permanentTracks
would make the most sense ?
Hey, awesome library!
I've been playing around with this component in NextJS and have noticed these scrollbars disable all scrolling/do not display in the initial server side rendered HTML
Here's a basic sandbox with NextJS, and a prod version deployed to Now https://codesandbox.io/s/with-styled-components-h29mz https://csb-h29mz-3ql9wvoej.now.sh/
You can see how the scroll bars "pop in" after the bundle loads vs no scrolling/scrollbars in the initial html, disabling javascript + refreshing the prod demo should show the initial server html
I'm not sure if this is intentional behavior, ideally scrolling would be possible from the getgo
The side-effect in not having scrolling immediately can be perceived as input lag
dependencies