adobe / spectrum-web-components

Spectrum Web Components
https://opensource.adobe.com/spectrum-web-components/
Apache License 2.0
1.24k stars 200 forks source link

[Docs]: Clarify support for consuming SWC in various UI frameworks #3932

Open Rednas83 opened 8 months ago

Rednas83 commented 8 months ago

Are there also plans for adding support for other frameworks besides react?

Westbrook commented 8 months ago

As per https://custom-elements-everywhere.com/#vue Vue doesn't need the help that React does when working with the DOM. What would you see as the benefits of a wrapper in the Vue context? I know we already have users that leverage Vue and then SWC directly as DOM, but we've not collected any feedback about additional work to support this context.

Rednas83 commented 8 months ago

That's really cool supporting al off the front end frameworks out of the box without the need of a special wrapper🚀

Perhaps an idea to also mention this to the main website to make this more clear.

Does this mean that the getting started and all the examples are applicable to all front end frameworks as well?

At least react seems to require a special wrapper image

Westbrook commented 8 months ago

The custom elements should be usable in all front end frameworks, yet. This is one of the key features of working with web components APIs!

Even in React you don't need a wrapper, but because of the ergonomics of their virtual DOM the amount of work you might end up doing to complete even a simple DOM element interaction can turn people off from working with our elements in that context. Hence the wrapper.

We make this statement on the home page:

Framework agnostic [#](https://opensource.adobe.com/spectrum-web-components/index.html#framework-agnostic)

You can use web components with any framework, since they’re supported and encapsulated at the browser level.

But, we'd love to hear if there was a better wording or location to include such information.

Beyond that, we'll close this issue by the start of next week, and if you run into more focused questions/requests during your adoption, we'd love to see new issues for those discussion. Thanks in advance!

Rednas83 commented 8 months ago

Never heard of web components, but it sounds interesting.

Perhaps you can consider adding something like this to docs. It will also help for SEO

Current support

Front-end framework Status Note
React ⚠️ Active Requires using swc-react
Angular :white_check_mark: Active
Vue.js :white_check_mark: Active
Bootstrap :white_check_mark: Active
Svelte :white_check_mark: Active
Ember.js :white_check_mark: Active
Backbone.js :x: Inactive Not supported
jQuery :x: Inactive Not supported

https://custom-elements-everywhere.com