Closed tarsisexistence closed 8 months ago
funny thing, if you wrap <App/>
in StrictMode (double render on init) it breaks the scroll 🥲
@tarsinzer does the recent PR fix this issue? I can close this ticket if so!
@dkaoster yeah, it does. I can verify that the recent 0.0.17 release is working fine!
Version: 0.0.16 Bundle: react/jsx (both cjs, esm) Repro: https://stackblitz.com/edit/scrolly-video-react-bug
Interesting thing here that you could guess by the title So, I built a reproduction, and if you change there
videoPercentage={videoPercentage}
forvideoPercentage={0}
i.e. no video percentage changes on input, butScrollyVideo
still breaks. For the checkbox change (trackScroll), it just blinks, but I think that's fine.I found that
ScrollyVideo
stopped breaking just after wrapping it inside ofReact.memo
. From the call stack, I see it finishes withdestroy
.So, I can't be sure is
videoPercentage
really broken because it probably works fine, for example, once per 15-20 times, it doesn't break. In my particular case, I'm interested invideoPercentage
API.