csf
csf copied to clipboard
Only exports that are functions should be considered stories
There is a way to have non-story exports in es6 modules, but it's a bit cumbersome. I'm wondering if it would be easier to say that only exports which are functions are stories, and to ignore other exports? There is probably a reason this isn't the case, but it's not clear from the documentation. It even says
With CSF, every named export in the file represents a story function by default.
so it seems like only functions can be stories. It wouldn't be too difficult then to ignore exports where typeof potentialStory !== 'function'
, right?
We want to leave the door open for making stories that are only data objects.