| Yeah but how is that different from any other UI framework? onCreate/onStart/onResume and onComponentDidMount, onPause/onStop/onDestroy and onComponentWillUnmount are basically the same. Be it Android, Swing, or Qt, everywhere it's the same pattern. React is the first framework which actually feels like UI development on the web, not anymore like JS spaghetti. In fact, having internal state, externally given props, exposing events, and being declared through markup is exactly the same between React, Android or Qt. The only thing React brought to the table was allowing you to basically just recreate the children every time something changed, and it'd diff automatically. For us native devs this thread is hilarious, because it's just JS decs complaining over things we've always done |
> JavaScript classes, introduced in ECMAScript 2015, are primarily syntactical sugar over JavaScript's existing prototype-based inheritance. The class syntax does not introduce a new object-oriented inheritance model to JavaScript.
You've been tricked into thinking you're using a class, but you're really not. I understand it's a useful trick, but hooks are more idiomatic for JS as a language.
As a side note, one of the problems with JS is that the community often disagrees about what JS is: https://babeljs.io/blog/2018/07/27/removing-babels-stage-pre...