GithubHelp home page GithubHelp logo

Comments (17)

vernondegoede avatar vernondegoede commented on May 29, 2024 28

@kopax https://gist.github.com/vernondegoede/0575d268d52e00f221cc86057fb938d1

from styled-components.

vernondegoede avatar vernondegoede commented on May 29, 2024 8

Yes, it's working fine. Just use the addDecorator method which comes with react-storybook.

from styled-components.

mxstbr avatar mxstbr commented on May 29, 2024 2

/cc @arunoda @mnmtanish, maybe you have some input about how you're using context before I find time to dig in?

from styled-components.

mxstbr avatar mxstbr commented on May 29, 2024

Thank you for reporting this, I will take a look today! Sounds like they rely on some context updates which we might or might not be blocking.

from styled-components.

mxstbr avatar mxstbr commented on May 29, 2024

Can you retry with v1.0.4 of styled-components? If it was a context issue that should've fixed it.

from styled-components.

thani-sh avatar thani-sh commented on May 29, 2024

I just checked it out. The bug is still there.
https://github.com/mnmtanish/storybook_styled-components_example/pull/2

from styled-components.

mxstbr avatar mxstbr commented on May 29, 2024

Thank you, this does seem to be something else then! Any errors in the console?

from styled-components.

amsb avatar amsb commented on May 29, 2024

No errors in console.

from styled-components.

arunoda avatar arunoda commented on May 29, 2024

@mxstbr I didn't try this yet or read the code in full.
But I suspect the issue lies here

Components rendered on Storybook never see componentWillReceiveProps hook. That's because we always do the initial rendering.

from styled-components.

mxstbr avatar mxstbr commented on May 29, 2024

Components rendered on Storybook never see componentWillReceiveProps hook. That's because we always do the initial rendering.

I don't quite understand this – shouldn't the components still receive props?

from styled-components.

arunoda avatar arunoda commented on May 29, 2024

@mxstbrcomponentWillReceiveProps is no called in the initial render. In React Storybook, we only the do the initial render.

from styled-components.

thuringia avatar thuringia commented on May 29, 2024

Hi everyone,
not sure if this is related but I get a TypeError due to ThemeProvider#unsubscribeToOuter being undefined in componentWillUnmount.

from styled-components.

mxstbr avatar mxstbr commented on May 29, 2024

@thuringia which version are you on? I'm pretty sure we fixed that a week or two ago!

from styled-components.

thuringia avatar thuringia commented on May 29, 2024

@mxstbr apparently we're still using 1.0.3. Seems like somebody pinned the versions without my knowledge. Sorry!

from styled-components.

jjstrat3 avatar jjstrat3 commented on May 29, 2024

@arunoda pardon my ignorance, but your statement about React Storybook only doing the initial render confuses me. With addons like Knobs, I'm able to change props in realtime...how would this be different??

from styled-components.

kopax avatar kopax commented on May 29, 2024

Is react-storybook now working with styled ?

from styled-components.

kopax avatar kopax commented on May 29, 2024

One last thing, @vernondegoede what should be the parameter passed to addDecorator ?

from styled-components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.