4 ms·
I don't agree that D3's data binding is especially odd. It isn't as straightforward as React's vdom descriptor, but it's not especially complicated: https://bos
by krebby 10y ago
I don't agree that D3's data binding is especially odd. It isn't as straightforward as React's vdom descriptor, but it's not especially complicated: https://bost.ocks.org/mike/circles/ https://bost.ocks.org/mike/circles/
- gedy 10y agoTo each their own - my issue is if you are starting with some JS data (via API, etc) - trying to bind to D3 is rather complex compared to using other view tech.
- krebby 10y agoThat's fair. Keep in mind that d3's major use case has historically been for building interactive data visualizations with dynamic data. Viewed through that lens, its data binding is a pretty integral part of the design.
- colinmegill 10y agoYou are in the minority. Having taught it, I've seen students struggle. Creating markup through chained functions executed as many times as there are items in an array, where the convention is to name the array singularly: ie., node.append('g') is counterintuitive.
- krebby 10y agoIt's definitely a steeper learning curve than simply creating a node and appending to the DOM (the d3-specific idioms are particularly obtuse) but it's not insurmountable.