Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only exports that are functions should be considered stories #14

Open
mariusGundersen opened this issue Sep 3, 2020 · 1 comment
Open

Comments

@mariusGundersen
Copy link

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?

@shilman
Copy link
Contributor

shilman commented Sep 4, 2020

We want to leave the door open for making stories that are only data objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants