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.

Bugs around styled-components 4.0 beta

See original GitHub issue

Bug Report

Some features of styled-components 4.0.0 beta are broken when used inside a Docz document. I would open a bug to SC directly but the same code works fine in react-styleguidist so I’m not quite sure where I should open the issue.

The bugs seems to be mainly around the styled() syntax of styled-components. Which I assume got changed a bit internally with 4.x.

Considering this file

https://github.com/eramdam/docz-repro-error/blob/master/test/hello.tsx

Here is how it’s supposed to look (and how it looks under styled-components 3.x):

screen shot 2018-09-20 at 3 22 11 pm

Here is how it looks with styled-components 4.x installed:

screen shot 2018-09-20 at 3 20 45 pm

Feel free to clone https://github.com/eramdam/docz-repro-error and alternate between the master branch (4.x) and sc-v3 (3.x) to try.

I’d be happy to provide more details if needed.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
pedronauckcommented, Sep 27, 2018

Sorry @eramdam, the rendering issue isn’t a bug from react-docgen, I’ll keep this openning 🙏

1reaction
jamschcommented, Sep 21, 2018

styled-components v4 somehow broke my app’s navigation as well as extending on base styles didn’t seem to work. No console errors or logs. I don’t think it’s related to docz though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Releases - styled-components
Highlights: styled-components is now written in TypeScript and ships its own types; stylis v4; tons of bug fixes; node 14+ now required.
Read more >
[v4 beta] Server rendering not working · Issue #1972 - GitHub
Just enforcing that branch master is on styled-components v3 and the changes are on styled-v4 branch.
Read more >
Announcing styled-components v4: Better, Faster, Stronger
We're very excited to announce that styled-components v4 is officially in beta! Get it now with your favorite package manager and help us ......
Read more >
styled-components - npm
Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress. Latest version: 5.3.6, ......
Read more >
Error when i try to install styled-components in my react projet
`yarn add styled-components [1/4] Resolving packages. ... you think this is a bug, please open a bug report with the information provided in ......
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