Replies: 3 comments 1 reply
-
@kerryj89 did you get anywhere with this? |
Beta Was this translation helpful? Give feedback.
1 reply
-
@kerryj89 thank you for getting back. I will check the link out. |
Beta Was this translation helpful? Give feedback.
0 replies
-
#32362 (comment) from a duplicate conversation provides a working solution. Note that globals aren't directly reactive but according to the OP on that thread, MDX gets remounted entirely on globals changes anyway. |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I've created an
.mdx
file and inside it I created some React wrapper components that wrap the Storybook doc blocks to extend its functionality - works great!But I want these wrapper components to be able to set/get from Storybook globals defined in
preview.tsx
'sglobalTypes
.I am trying to leverage Storybook's globals so that it can re-render optimally, but should I instead be using localStorage and useEffect to watch for changes there for these wrapper components? Sorry if my terminology or thinking is wrong, still learning React on the side.
Additional information
No response
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions