Closed blackrabbit99 closed 7 years ago
Hi @blackrabbit99, what would be the benefits over the following?
sizeChanged: function(resizeAttributes){
if (this.stateOrProps.disableResizeListening) return;
// ...
}
Prevention of any computation behind the component. Sample: I got 20 components where I want to handle resize callback but only one concurrent that i'm interested in.
I mean vanilla implementation has attach
and remove
flow. So I guess it would be great to add the flow in the react component
I like to keep things light (minimal surface-api), specially if I have to maintain it (while not using it anymore), I'll have to thrust you that computation represent a perf (right?) issue with many components since I will not test this anytime soon. So anyway I'm always open for a PR, so if you are sure of the added-value I invite you to fork the repo and implement what you have in mind, even if I don't merge your PR you can still use your fork, MIT license powa ;)
Don't you think that it would be great enhancement to add disable prop to prevent listening to changing of some nodes' size ?