Skip to content

Access defined globals inside a story #14072

Answered by shilman
seppzero asked this question in Help
Discussion options

You must be logged in to vote

If you just want access to the current values, the second argument to a function is a StoryContext which contains a globals field

export const MyStory = (args, { globals }) => {  .... }

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@seppzero
Comment options

Answer selected by seppzero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #14070 on February 26, 2021 20:46.