-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[docs] Use immediate export when there is no HOC part 2 #16038
Conversation
No bundle size changes comparing 396e379...36c4dd6 |
0c3de4f
to
a603491
Compare
I appreciate the effort but this is a lint rule in disguise and we should have a discussion about those. It is IMO wasteful to introduce lint rules into the codebase without any rationale. They add diff noise and require a conscious code style shift when working on this codebase. Is there a rational for -function foo() {}
-export default foo;
+ export default function foo() {} ? |
See #16003 (comment) |
So "shorten the demos". Not a fan but makes sense. Still better implemented with a lint rule. I can take care of that in another PR. |
I would emphasize the value on "not having to duplicate the component name". It's one less degree of freedom (so you can't use two different names by mistake). This is only marginally better, it won't change thing much at the end of the day. I believe it's one of those small details that compounds. |
@merceyz Can we split the effort? I propose that we remove the automatic generation part of this pull request that has controverse around it. This way, we can benefit from the documentation improvement by merging it. It will also make the review of the eslint or code generation logic easier in the next pull request. |
@oliviertassinari Sure, I ran the command again to update the remaining demos and reverted the changes to |
Perfect! |
Followup to #16005, VSCode failed to find and replace all the instances on the first try. Used
formattedTSDemos
to do it correctly this time