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.

Question: what is "module" the second argument of storiesOf?

See original GitHub issue

For this code, what is module? and what can you do with it?

storiesOf('Button', module)
  .add('with text', () => (
    <Button onClick={action('clicked')}>Hello Button</Button>
  ))

Issue Analytics

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

github_iconTop GitHub Comments

16reactions
ndelangencommented, Oct 12, 2017

that’s indeed it @elisechant !

Storybook needs a reference to the file/module where your story-code is int to enable hpt-module-replacement.

If you do not supply it, you’d need to refresh your browser for every change you make to your component & story code.

I hope this helps! (please re-open if your have further questions)

4reactions
Lelithcommented, Jan 14, 2019

thanks @ndelangen

adding following to my eslintrc file worked for me

"env": {
    "browser": true,
    "node": true
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Avoiding common confusions with modules in Angular
The article dives deep into inner implementation of module system in Angular. ... And options that you pass as the second parameter are...
Read more >
How To Work with Files using the fs Module in Node.js
The second argument is the data you are writing, in this case the csvHeaders variable. Next, create a new function to add items...
Read more >
Module 2: The Words We Are, The Stories We Tell
Module Introduction This module discusses the stories we tell to make sense of the world. The importance of storytelling to human existence is...
Read more >
Args - Storybook - JS.ORG
“Args” are Storybook's mechanism for defining those arguments in a single ... Button.stories.js|jsx import React from 'react'; import { Button } from '....
Read more >
Introduction to Jean Baudrillard, Module on Simulacra and ...
It is a question of substituting the signs of the real for the real” ("The Precession ... a place marker for the real;...
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