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.

Storybook-addon-jsx doesn't work with knobs

See original GitHub issue

I can’t get this addon to work with knobs addon. This

storiesOf('NavKnobs', module)
  .add('without title', () =>{
    const name = text('Title', 'Page title');
    return (<Nav logo={logo}>
      <Link to="/">Home</Link>
    </Nav>)
  })
// and
storiesOf('NavKnobs', module)
  .addWithJSX('without title', () =>{
    return (<Nav logo={logo}>
      <Link to="/">Home</Link>
    </Nav>)
  })

both work.

But this doesn’t

storiesOf('NavKnobs', module)
  .addWithJSX('without title', () =>{
    const name = text('Title', 'Page title');
    return (<Nav logo={logo}>
      <Link to="/">Home</Link>
    </Nav>)
  })

Knobstore is null (after page reload)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ktjcommented, May 24, 2017

That PR fixes the problem, thank you!

1reaction
alexandrebodincommented, May 23, 2017

@ktj I made a PR #12 that should work Can you try it with your project ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

react storybook addon knobs not showing - Stack Overflow
I cant seem to be getting the @storybook addon knobs working? It doesnt seem to be decorating the actual story. Pretty much followed...
Read more >
[addon-knobs] Seeing knobs from previously selected story #19
It seems to be the track decorator from react-tracking that magically breaks knobs. This doesn't make very much sense to me right now....
Read more >
Storybook Addon Knobs (deprecated)
Button knobs cause the story to re-render after the handler fires. You can prevent this by having the handler return false . withKnobs...
Read more >
Next-level component showcasing with Storybook controls
Learn about controls, a new Storybook addon that lets you dynamically interact with your React components for demo and testing purposes.
Read more >
React Storybook Addon Knobs - Edit Props Dynamically
In this video, I will show you how to install and use storybook knobs addon to edit properties dynamically in ReactJS.
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