spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

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

Open Rednas83 opened this issue 1 year ago • 4 comments

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

Rednas83 avatar Jan 10 '24 14:01 Rednas83

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.

Westbrook avatar Jan 10 '24 22:01 Westbrook

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

Rednas83 avatar Jan 11 '24 08:01 Rednas83

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!

Westbrook avatar Jan 11 '24 13:01 Westbrook

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

Rednas83 avatar Jan 12 '24 09:01 Rednas83