moving my brain dumping thread here. I think there’s two issues at play w.r.t. perf
I tried putting it behind useDeferredValue, but it didn't do anything as it seems like the scroll handler has an unstable identity for no good reason
Easy solution - take my existing useScrollsToTop hook, and put a useDeferredValue on it. therefore we can defer this nonsense until after the lightbox has finished rendering
alas no. List rerender anyway. Profiler blames onScroll, and I added logging and yeah it changes on that initial ctx change
1 2I’m pretty sure it’s just unstable, I.e. different identity on each render, which shouldn’t be the case - it’s not doing anything here! next step is to narrow down what’s causing it to change. Reanimated has some magical auto-dep-array stuff which is probably to blame - likely doesn’t mesh w/ RC
1 2Samuel
@samuel.fm
Each time each image in the lightbox loads, it re-renders with its image dimensions. So we have 4 fairly heavy components (each image) rendering invisibly before the animation can begin, and each one re-renders as they load. maybe the animation is queued behind that whole process?
1 2