v2: Make a decision on casing for the default export
See original GitHub issueTinyColor
vs tinycolor
:
The lowercase variation is the v1 API, so keeping that would make migration easier. The camel cased variation is more typical for class naming.
This mostly just affects UMD users and how we write it in documentation if we go with something like https://github.com/bgrins/TinyColor/pull/181 where we do a default export for node.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
What is the benefit of prefer-default-export? #1365 - GitHub
With default exports, you lose refactoring power (if you rename the source const / function / class , it won't rename default imports)....
Read more >Change: Prefer default export to no default export (#20) · Issues
There will not be a decision to make between single-export and multiple-export modules. All modules will export named exports, ...
Read more >What is export default in JavaScript ? - GeeksforGeeks
Default Exports: Default exports are useful to export only a single object, function, variable. During the import, we can use any name to...
Read more >Default Exports in JavaScript Modules Are Terrible - Reddit
Heck for your use case you can still forgo default export: simply import with “* as” then iterate the import object if you...
Read more >ts-transform-default-export | Yarn - Package Manager
Whether to throw when there are named exports in the module along with the default one. This is important because when a default...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah, I’ve gone back and forth. I’m also leaning lowercase for now since that’ll make migration from v1 to v2 seamless for most cases. I actually wish it was camel case to match the project name, but I think there’s value in uncoupling that potential name change from getting v2 shipped.
i think we should keep it showing new because it is still a class.
I do think some of the readme examples no longer work?
might not be working anymore.