The Two Ways to Build a Zoomable Dataviz Component With d3.zoom and React

A question I often get is: “How do you build a zoomable dataviz component?”
Well, you use d3.zoom. That gives you zoom events for pinch-to-zoom and the mouse wheel. Detects panning too. Just like your users expect from everything else that zooms.