Get Handle on Controls Addon state in Storybook Story component #15657
Unanswered
charkour
asked this question in
Documentation
Replies: 1 comment
-
From Discord, kylegach suggests
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, thanks for storybook!
I have a component that has internal state that updates and I would like that internal state up update the Args Table on the Controls Addon. Below is a video of what currently happens which is working the wrong way.
Screen.Recording.2021-07-22.at.1.20.48.PM.mov
Here is currently what I have for my component. I pass in the argument
value: 3
and when I use the Controls Addon Arg Table to change value, it updates in the component, however, I don't know how to update the state of the Controls Addon Arg Table. I've tried usinguseAddonState
from @storybook/api. But I get an error, "Cannot read property 'getAddonState' of undefined". Thanks for the help.Beta Was this translation helpful? Give feedback.
All reactions