Less performant deeper in the dom?
Great component. Is there any reason why this would perform worse at higher dom depths?
Debugging some performance issues and removing divs so far has been the only solution (and performance issues roughly scale with how deep it is). Looking at dev tools performance tab, looks like all the time is spent in script and not rendering.
I'm returning another <Reorder/> in the same component at a shallower depth and it's silky smooth (and removing this one doesn't affect the performance of the other).
My reorder:
<Reorder placeholder={<div className="placeholder"/>} lock="vertical" reorderId={`reorder-small`} onReorder={(ev, prevIdx, nextIdx) => onReorderPhotos(prevIdx, nextIdx)}>
{
photoUrls.map((url, idx) => (
<div style={{ backgroundImage:`url(${url})` }} className={'reorder-item'} key={idx} >
</div>
))
}
</Reorder>
Sorry for limited info. I'm on 3.0.0-alpha.7. Thanks!
Hi, do you mean the further down your DOM tree reorder is rendered the laggier it is? Is reorder updating state that is much further up the tree? Could you perhaps put together a full example?