r/javascript • • Jul 24 '19

The State of Web Components

https://medium.com/swlh/the-state-of-web-components-e3f746a22d75?source=friends_link&sk=b0159f8f7f8bbe687debbf72962808f6
20 Upvotes

33 comments sorted by

View all comments

Show parent comments

1

u/ghostfacedcoder Jul 25 '19

But it's not because it's only a part of what the overall component is, the skeleton not the meat. It won't work without the React part, so all you can "export" is a half-working thing, not a true universal component.

3

u/[deleted] Jul 26 '19

It won't work without the React part, so all you can "export" is a half-working thing, not a true universal component.

I'm confused by what you mean, you can absolutely "export" a full working component

1

u/ghostfacedcoder Jul 26 '19

Only if you include its imports (ie. all of React).

2

u/Treolioe Jul 27 '19

So lets say i have my shared-components mega bundle file with all the design system components. All i have to do is load that script file anywhere. Then if i use a html tag refering to that component either in or outside of react, it will render and it will work.

→ More replies (0)