3 ms·
The solution you've mentioned - building your option object in an effect - is straightforward, but from my perspective very un-reacty. In some sense, the attrib
by Octoth0rpe 3y ago
The solution you've mentioned - building your option object in an effect - is straightforward, but from my perspective very un-reacty. In some sense, the attributes in the option object will end up becoming various types of svg nodes. I can imagine that a more react-friendly implementation of e-charts would have components for each part of the option object. I also think echarts update process (setOption, merge/notMerge, etc) doesn't map very well to react's lifecycle concepts.
That said, none of this is a dealbreaker from my perspective. It's an awesome library and it's _generally_ a joy to work with in react. But there's a bit of friction and that's ok.