question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Web Components support

See original GitHub issue

From a cursory glance at web components, supporting them should be possible. This should probably live at another entry point (like import styled from 'styled-components/web'), and the only thing that would need to happen is instead of returning a react component, we return a web component.

The entire react-specific part of styled-components lives in a single, tiny file: src/models/StyledComponent.js. (and StyledNativeComponent.js)

I won’t be able to really dig into this until after #120 and #59, so if somebody wants to pick this up it’d be greatly appreciated!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:19 (12 by maintainers)

github_iconTop GitHub Comments

4reactions
auderercommented, Mar 1, 2019

@yuki24 “Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress”

This sounds like more than just a React project! The concept of styled-components could fairly easily be applied to web components, as I’ve demonstrated here.

I am still very interested in the original concept brought up by @mxstbr in using a styled-components/web entrypoint for web component support.

3reactions
reywrightcommented, Nov 13, 2018

@mxstbr more interest for it now!

Read more comments on GitHub >

github_iconTop Results From Across the Web

"web components" | Can I use... Support tables for ... - CanIUse
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >
Web Components - MDN Web Docs - Mozilla
Web Components is a suite of different technologies allowing you to create reusable custom elements — with their functionality encapsulated ...
Read more >
webcomponents.org
Third party libraries to help you make the most of web components. Browser support.
Read more >
Custom Elements Everywhere
Custom Elements are the lynchpin in the Web Components specifications. ... If you're using Skate + Preact then it will support events with...
Read more >
Web Components 101: What are Web Components? | Medium
Which browsers support Web Components? Currently, all Evergreen browsers (Chrome, Firefox, and Edge) offer full support for Web Components.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found