react-easy-panzoom icon indicating copy to clipboard operation
react-easy-panzoom copied to clipboard

Prevent re-renders of children

Open devinhalladay opened this issue 5 years ago • 1 comments

Hi, I'm using Panzoom to create a zoomable/pannable canvas that includes draggable elements that can move around the canvas.

I'm having an issue where panning and zooming re-renders all children of <Panzoom>, creating huge performance bottlenecks, especially when there is a large quantity of children.

Is there a way to prevent this? Perhaps wrapping the Panzoom component in a React.memo?

devinhalladay avatar Oct 21 '20 21:10 devinhalladay

@mnogueron do you still maintain this repo?

devinhalladay avatar Oct 30 '20 01:10 devinhalladay