3 ms·
Have you tried React? It feels fairly library-esque to me. You can be useful in as little as two lines of code: const elem = React.createElement('div', null, '
by JMTQp8lwXL 6y ago
Have you tried React? It feels fairly library-esque to me. You can be useful in as little as two lines of code:
const elem = React.createElement('div', null, 'Hello World');
ReactDOM.render(elem, document.querySelector('body'));
It's 35.9kB gzipped, although "too big" is subjective. I may be unimaginative, but over my last 5 years or so with it, there isn't much I've wanted to change. As a library consumer, I don't personally mind if a VDOM is used or not, so long as performance is good enough not to ship a noticeably lagging UI to my users. Having experienced both React and Angular --one uses VDOM, the other not-- I haven't found this implementation detail to meaningfully impact performance, but I spent my time building straightforward CRUD apps.
I would consider sharing an example to Ari of something that's hard to do in React/Vue/Angular, and how it's made simple with AriJS. That might help elucidate where it shines, and the key problem being solved.
- rhengles 6y agoThank you! Yes, i've tried it. You can think of me like someone that prefers an old model of the Porsche 911 than the latest model - too much technology that you can't fix yourself, and that's my primary concern with the major frameworks - they're not simple to reimplement!
- dragonwriter 6y ago> Have you tried React? It feels fairly library-esque to me. Because it is, in fact, just a library.
- spankalee 6y agoReact implements the component lifecycle, calling into the component to do it, stores all the component state, and reconciles DOM changes on behalf of the component. It's the very definition of a framework - it's calls the component, the component doesn't call it.
- mewpmewp2 6y agoIt has been said it is a library, but imo it is not for the reason how it forces you to write code according to their rules. For instance functional components. Most of the code you write is to fit React, so for this reason I would say it is a framework.