3 ms·
You can absolutely use web components with react... you just have to use `<lower-case-component>` for webcomponents, since a capital first character will trigge
by tracker1 8y ago
You can absolutely use web components with react... you just have to use `<lower-case-component>` for webcomponents, since a capital first character will trigger JSX transforms.
So you can use, for example this set of components with a react application and get some of the best of both worlds. The only down side is attributes in web components aren't passable via the markup, only via DOM reference.
I happen to like react as-is, but Vue is probably much closer to web components and could see Vue becoming a compile to web components option sooner than later.
- zwww 8y agoVue already offers compiling to web components. https://cli.vuejs.org/guide/build-targets.html#vue-vs-js-ts-entry-files https://cli.vuejs.org/guide/build-targets.html#vue-vs-js-ts-...