3 ms·
BS there’s custom elements and classes and the ability to target them with a selector. This is standard now. Web components.
by reactordev 3y ago
BS there’s custom elements and classes and the ability to target them with a selector. This is standard now. Web components.
- nicoburns 3y agoWeb components don't really do the same thing. If you use web components then you still need to manage the DOM manually.
- MrJohz 3y agoWeb components solve encapsulation of structure, style, and behaviour within a single component, but they don't solve the larger state problems, because web components don't come with any sort of state management beyond what you can do with normal Javascript. React does provide components, but there's not so much different in React components than any other component system. The main reason to use React is the state management it provides on top of those components, making sure that state is in sync across the whole application. In my experience, the hard part of larger applications is that handling of application state. Rendering data can be done in umpteen different ways, and they're all pretty much good enough, but handling application state in such a way that every component remains in sync with all other components is hard.