Skip to content

Commit

Permalink
Merge pull request #1327 from natsathorn/master
Browse files Browse the repository at this point in the history
add step for import addon-action to addons.js file before start using it
  • Loading branch information
shilman authored Jun 21, 2017
2 parents b975fc3 + 62b2651 commit 2c54e27
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions addons/actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ Install:
npm i -D @storybook/addon-actions
```

Then, add following content to `.storybook/addons.js`

```
import '@storybook/addon-actions/register';
```

Import the `action` function and use it to create actions handlers. When creating action handlers, provide a **name** to make it easier to identify.

> _Note: Make sure NOT to use reserved words as function names. [issues#29](https://github.com/storybooks/storybook-addon-actions/issues/29#issuecomment-288274794)_
Expand Down

0 comments on commit 2c54e27

Please sign in to comment.