From 62b2651456df35106a8e9f141aab7ac66d1be52b Mon Sep 17 00:00:00 2001 From: Natsathorn Date: Wed, 21 Jun 2017 13:08:31 +0700 Subject: [PATCH] add step for import addon-action to addons.js file before start using it --- addons/actions/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/actions/README.md b/addons/actions/README.md index 7038dd0aca34..bd2801310850 100644 --- a/addons/actions/README.md +++ b/addons/actions/README.md @@ -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)_