1
User
Recs.
Recs.
28
Updates
Last
Updated
Updated
Activity
39 Options
Native/Vanilla web components.
SpecsUpdate
Custom Elements v1https://html.spec.whatwg.org/multipage/scripting.html#custom-elements
Shadow DOM v1http://w3c.github.io/webcomponents/spec/shadow/
Pros
Know any positive aspects of this option?
Cons
Con SSR is potentially more difficult
…if you need more than CSS' :not(:defined)
, that is.
Check out this video to see how the creator of SkateJS handled it: https://www.youtube.com/watch?v=yT-EsESAmgA
Know any negative aspects of this option?
Recommendations
Web Components
Recommended 5 years ago
Probably the future. They don't currently replace frameworks completely, but they do for highly reusable libraries.
Pro
Great for small—likely published—reusable librariesPro
Stylable via custom-exposed "parts"Pro
Customizable templates via custom-recognized "slots"Con
Not well-suited for application wiringPro
Fallback styling when not yet definedCon
SSR is potentially more difficultPro
Works with any frameworkCurrently displaying 1 out of 1 total recommendations.