top | item 21828956

Show HN: React Cosmos 5 – A dev tool for building scalable, high-quality UIs

20 points| skidding | 6 years ago |reactcosmos.org

4 comments

order

yodon|6 years ago

Looks awesome - any chance there is a way to use it in a codebase that doesn't use default exports? Perhaps adding shim files that import the component and re-export as default? (Would Cosmos have problems with the non-default-exporting TSX files?)

skidding|6 years ago

I generally avoid defaults exports as well but didn't realize some codebases disable them completely. What do you mean by "non-default-exporting" TSX files, can you provide a link?

> Perhaps adding shim files that import the component and re-export as default?

Definitely, you could add a transform to the Cosmos build pipeline that renames some named export to default. If you're willing to write the transform I'll gladly help you integrate it.