learnstorybook-code
learnstorybook-code copied to clipboard
Vuex configuration does not propagate to its child component's vuex store
Thank you for the great tutorial. I have one question regarding Vuex injection.
https://www.learnstorybook.com/vue/en/screen/ Supplying context to stories
I did exactly that (it was a little bit trickier because I was also using vuex modules), but then I found it doesn't govern its child components' vuex store. For example,
component-a uses component-b1 and component-b2. component-b1 and component-b2 are vuex-aware. I make story for component-a, and provide mock store for component-b1 and component-b2. Component-b1 and component-b2's mapState function does not recognize the mock I provided on component-a.
Does this sound right to you? If so, I think it might be good to include that limitation in the tutorial.
Thank you.
Today I was following the tutorial and I was not able to see the play button for the interactions. I guess it's something to do with this issue.
@Archetipo95 to give you a bit of context, it doesn't what @kennethchoe mentioned a while ago is something entirely different you're bringing up. If i'm understanding your comment correctly while following the tutorial you're not seeing the controls associated to the interactions addon (e.g., play, rewind), that's because they're behind a feature flag, more specifically if you want to see them you'll need to update your .storybook/main.js to the following:
module.exports = {
stories: [
// stories go here
],
addons: [
// addons go here
],
staticDirs: [''],
features: {
interactionsDebugger: true, // add this flag to enable controls for the interaction addon:
},
}
Let me know if i was able to help you!
Hope you have a great weekend!
Stay safe