Skip to content

Only exports that are functions should be considered stories #14

@mariusGundersen

Description

@mariusGundersen

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions