Yomguithereal / react-blessed

A react renderer for blessed.
MIT License
4.45k stars 177 forks source link

Bind this context in event handlers #104

Closed lins05 closed 4 years ago

lins05 commented 4 years ago

So we can get the underlying blessed element in callbacks. This could be handy, e.g. to get the width/height of the element. Otherwise the only way I can think of to achieve that is to use the ref trick of react to get the element, which is tedious and error-prone.

Yomguithereal commented 4 years ago

Hello @lins05, thanks for the PR. Just one question: are event handlers bound to the DOM node in react-dom?

lins05 commented 4 years ago

@Yomguithereal Emm, seems not. I see it's better to preserve the consistency with the DOM api. Closing this.