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.

3.0.0-8: Problem extending component styles

See original GitHub issue

Haven’t had any luck extending styles. Here is a gist of the relevant code.

Debugging steps taken

  • Updated all related packages to latest version (rebass, styled-components, babel-plugin-styled-components, gatsby-plugin-styled-components)
  • Reset node_modules rm -rf node_modules && npm i
  • Reset browser cache

The code is pretty standard as far as I can tell. Cheers

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
probablyupcommented, Sep 21, 2018

A fix for this was released in v4.0.0-beta.8.

Long story short if two versions of hoist-non-react-statics are bundled together they poison each other.

1reaction
gi-aleccommented, Sep 15, 2018

Looked into it further and realized extended ANY existing styled component using styled(Component) isn’t working in my project. This one doesn’t seem to be a Rebass issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to extend / inherit components? - angular
But my problem is with the inheritance of the decorator @Component, which is not applied to the inheritance metadata. =/ – Fernando Leal....
Read more >
styled-components does not inject styles in head #2254
The error with styles happens only when webpack is in development mode. My suggestion is that both website and extension use the same...
Read more >
styled-components | Yarn - Package Manager
Because styled-components allows any kind of prop to be used for styling (a trait shared by most CSS-in-JS libraries, but not the third...
Read more >
Extending a Component's Styles
In the last chapter, we learned about overriding a component's styles. We did this by replacing the original styles with our own. However,...
Read more >
How To Extend Classes with Angular Component Inheritance
Then, run the following command to create a Base component: ng generate component base --inline-template --inline-style --skip-tests --module ...
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