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
Storybook relies a lot in the Storybook channel. It only works correctly in Storybook, as most of places where channel events are registered are part of Storybook manager UI. In portable stories, it's just mocked. This causes issues in case stories or decorators actually need to emit/listen to events. One very clear example is the useArgs hook from @storybook/preview-api, which relies on emitting events, and therefore it won't do anything in portable stories. It so happens that many people use that hook because they want the controls panel to update as they interact with their components.
💡 Solutions/Action items:
Honestly not sure, we need to discuss/research
(From Michael) Specifically for useArgs, we could listen to its event in the mocked channel in PS and throw an error mentioning it's not supported (great short term solution)
The text was updated successfully, but these errors were encountered:
Storybook Channel
Storybook relies a lot in the Storybook channel. It only works correctly in Storybook, as most of places where channel events are registered are part of Storybook manager UI. In portable stories, it's just mocked. This causes issues in case stories or decorators actually need to emit/listen to events. One very clear example is the
useArgs
hook from@storybook/preview-api
, which relies on emitting events, and therefore it won't do anything in portable stories. It so happens that many people use that hook because they want the controls panel to update as they interact with their components.💡 Solutions/Action items:
The text was updated successfully, but these errors were encountered: