In my regular react project, I usually colocate stories with their components, like this:
Component.js
Component.test.js
Component.stories.js
I do this via the config:
import { configure } from '@storybook/react'
const req = require.context('../src', true, /\.stories\.js$/)
function loadStories() {
req.keys().forEach(filename => req(filename))
}
configure(loadStories, module)
since react-native doesn't support require.context, I was wondering if it'd be possible to reproduce this behaviour somehow for storybook for react-native.
Just googled to find this - https://github.com/elderfo/react-native-storybook-loader
thanks, worked like a charm
Most helpful comment
Just googled to find this - https://github.com/elderfo/react-native-storybook-loader