-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Reconsider my file naming convention and default exports #440
Comments
Reference : reactjs/rfcs#64 (comment) 🌹 |
@basarat The RFC is merged, but by skimming over the long thread I fail to understand what impact it has on your recommendation to avoid named exports. I would still want to use named exports because I create barrel files etc, but could add a default export if required for lazy imports. As far as file naming goes I'm convinced that all lower case file naming is superior. I wish you would use the style guide to at least point users to some of the benefits, instead of just saying camel-casing is the convention so you should use that. But maybe I should just write an article to try and persuade people :) |
You and I see eye to eye 🤗 My new objective : add a section "When its okay to use export default" and simply point to I also eye eye to eye on file naming. I recommend camelCase here https://basarat.gitbook.io/typescript/styleguide#filename and I don't see myself adding confusing-anything-is-fine (which is how I view most things personally, life is too short) comments to a styleguide so will leave it as is 👍 |
My point was not to hint on "anything is fine" but more the contrary. Consistency is important and I think its harder to achieve with camel-cased file names. But I will just start by spreading the word myself. |
I was just thinking out aloud 🌹
|
If this React
React.lazy
RFC lands will change the naming convention to beButtons.tsx
(instead ofbuttons.tsx
) and sunset the default exports issues, probably move into a blog post with a mention of its okay as the conventions beat personal preference 🌹The text was updated successfully, but these errors were encountered: