DEV Community

loading...

Discussion on: Why I use Web Components - My use cases

Collapse
paulmaly profile image
PaulMaly

Actually, Svelte components are just stand-alone JS classes. So, you can use them in React/Vue/Angular/Whatever apps.

Collapse
ackvf profile image
Vítězslav Ackermann Ferko

link please

Collapse
shihn profile image
Preet Shihn Author • Edited

Theoretically sure. Not in the same way really. One of these works.

<ReactComponent>
  <SevleteComponent></SevleteComponent>
</ReactComponent>
<ReactComponent>
  <web-component></web-component>
</ReactComponent>

Also, WCs you can use is raw HTML as well or anywhere that takes html. So people who are not JS devs can use them easily (Not saying that WCs work without JS)

<body>
  <p>
    <my-fancy-image>
   </p>
</body>