You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Documentation]: Essentials Actions references @storybook/action-addons both in the current documentation and in the advanced/legacy documentation
#25727
Open
tgigsigniant opened this issue
Jan 23, 2024
· 2 comments
· May be fixed by #28925
Should we stop using the action function exported from @storybook/action-addons? And, will the action function from @storybook/action-addons be deprecated in v8 of storybook like the advanced/legacy documentation seems to suggest?
Additional context
No response
The text was updated successfully, but these errors were encountered:
The action function is not deprecated, and won't be deprecated in 8.0, you can keep using it, if you just want to log an action to the action panel.
But we recommend in general to assign the fn function from @storybook/test in 8.0 to your args for events/actions, except if your use case doesn't allow for it, for some advanced reasons.
// Replace your-framework with the name of your frameworkimporttype{Meta}from'@storybook/your-framework';import{fn}from'@storybook/test';import{Button}from'./Button';constmeta={component: Button,// 👇 Use `fn` to spy on the onClick arg, which will appear in the actions panel once invokedargs: {onClick: fn()},}satisfiesMeta<typeofButton>;exportdefaultmeta;
Describe the problem
Essentials Actions documentation references @storybook/action-addons both in the current documentation and in the advanced/legacy documentation.
Should we stop using the action function exported from @storybook/action-addons? And, will the action function from @storybook/action-addons be deprecated in v8 of storybook like the advanced/legacy documentation seems to suggest?
Additional context
No response
The text was updated successfully, but these errors were encountered: