4 ms·
Custom elements is like an API of six methods `connectedCallback`, `disconnectedCallback`, attributeChangedCallback`, `adoptedCallback`, `attributes` and `regis
by wiredearp 9y ago
Custom elements is like an API of six methods `connectedCallback`, `disconnectedCallback`, attributeChangedCallback`, `adoptedCallback`, `attributes` and `register`. I don't see why this must nescessarily be compared with React or Vue any more than `appendChild` or `inserBefore` or any of the other DOM APIs. High level frameworks use the current DOM APIs now and they will surely use the new APIs in the future, but that doesn't mean that you have to use them, that's in fact the whole selling point of React and Vue.
You can use custom elements in React and you can even use React in custom elements, so they are not designed to be competing technologies. Quite the opposite.