Creating an addon and sharing state with a decorator #12318
Unanswered
ericchernuka
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’m building my first addon for a project and I have a set of fields which allow for custom colours. I want to use the new 6.0 colour input to then share this state to an emotion theme provider. I’m just wondering what the best way to do this is? Storybook threw an error when I tried to access useAddonState within a decorator which lead me to think maybe I needed to use useChannel and communicate that way but I got a similar undefined error since the preview I don’t think has access to these hooks.
My state is really just
{ primary: string, secondary: string, ctaLink: string }
so nothing fancy.Any advice would be helpful.
Beta Was this translation helpful? Give feedback.
All reactions