storybook-eol/react-native-storybook

Placing stories outside storybook's config folder

barakcoh opened this issue · 4 comments

Hi

We like to co-locate our Stories with the components they describe. Unfortunately this methodology broke in recent versions of react-native-storybook. I've traced the issue to projectRoots that seems to be pointing to the specified config folder.

If I add another projectRoot that points to the actual project (repo) root is the issue is gone. WDYT of such a solution? If you're good I'm more than happy to submit a PR.

Hi @barakcoh,
Thanks for creating the issue. Please go ahead and send the PR. I just want to verify something about using multiple project roots. Is react-native using the correct index.*.js files when using multiple project roots? It should always use the index files in storybook directory instead of those in project root.

Hi @mnmtanish

I opened the PR, having multiple index.*.js doesn't seem to be an issue. The correct index.*.js (the one from within my storybook folder) was picked up as the entrypoint by the packager.

Published RN Storybook v2.2.4 with this fix