0
rated 0 times
[
5]
[
5]
/ answers: 1 / hits: 5771
/ 4 Years ago, wed, march 18, 2020, 12:00:00
I am testing a react app with storybooks. For some reason my custom story is not loading properly. If I write my custom story in 1-Button.stories.js
is renders but if its in 2-MyFunction.stories.js
, it doesn't render
In the src/stories
directory, I have 3 files:
0-Welcome.stories.js
1-Button.stories.js
2-MyFunction.stories.js
This is my .storybook/main.js
:
stories: ['../src/**/*.stories.js'],//similar to config.js
addons: [//similar to addons.js
'@storybook/preset-create-react-app',
'@storybook/addon-actions',
'@storybook/addon-links',
],
};
Here is the MyFunction.stories.js
:
import MyFunction from '../Components/MyFunction;
export const Functiontest = () => <MyFunction .../>;
More From » reactjs