Closed Swinejamin closed 5 years ago
Where are you putting the call to install the plugin on the Vue instance?
Ach, I didn't have it in .storybook/config.js
like I thought I did. 🤦♂
@Swinejamin No problem! Glad you got it sorted!
Can I see how you got it working? I did below and its not picking up any stories.
import VueCompositionApi from '@vue/composition-api'
Vue.use(VueCompositionApi)
That's all I had to add to get it working.
its not picking up any stories.
Any errors in the console? This makes me think your config isn't looking for stories properly. Are you using storiesOf
or CSF
? I'd start by making sure that your config matches the format of your stories. (Speaking from experience here.)
If that doesn't help, post your complete config.js
?
Since props are passed via default, they are not reactive. Should I open a new issue for this?
Inject vue instance in your story files
Task.stories.ts
import Vue from 'vue'
import VueCompositionApi from '@vue/composition-api'
import Task from './Task.vue'
Vue.use(VueCompositionApi)
Is your feature request related to a problem? Please describe. Writing components with Vue's composition API causes stories to break. It appears that the
setup()
function is never called.Describe the solution you'd like Provide support for the API.
Describe alternatives you've considered Provide a way to manually call the setup function before mounting the component.
Are you able to assist bring the feature to reality? Not currently.