Yomguithereal / react-blessed

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

Replacing react dependency by using babel transforms #76

Closed mainrs closed 5 years ago

mainrs commented 6 years ago

Hey!

Would it be (generally speaking) possible to replace React with the babel-transform-jsx plugin? As far as I understood, react-blessed uses React under the hood, at runtime. This sounds like a huge dependency for just a cli app. Ink for example uses the transform approach, transpiling JSX at compile time to normal function calls.

I am not sure how much reward one would get compared to the time needed to port.

Yomguithereal commented 6 years ago

This can be tried but I am not sure it would work. The runtime works by hooking on some React internals and it might be difficult to drop everything related to it.

bensleveritt commented 5 years ago

@SirWindfield As I understand it, the addition of React brings advantages beyond JSX (lifecycle methods, hooks, etc.). It's an overhead, but arguably less worrisome than in the browser.

As there isn't any action here, perhaps this issue can be closed?