-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
chore: update React examples to match with the new React guidelines #12217
Conversation
Codecov Report
@@ Coverage Diff @@
## main #12217 +/- ##
==========================================
- Coverage 67.51% 67.51% -0.01%
==========================================
Files 328 328
Lines 17246 17246
Branches 5071 5071
==========================================
- Hits 11644 11643 -1
- Misses 5569 5570 +1
Partials 33 33
Continue to review full report at Codecov.
|
Thanks for this @charpeni! Can we remove the weird |
109be51
to
707f8b1
Compare
Sure thing. I reverted changes to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
beta.reactjs.org brings new guidelines for code examples. One notable change is that named
function
expressions are now preferred over arrow functions for top-level functions.Updating all our React examples to match with the guidelines as well as removing React imports in favor of the new JSX transform. This should reduce some confusion caused by the disparity between Jest docs and React docs.
versioned_docs
as they could be released in the next release.Test plan
Examples in the docs are showing up nicely on
next
.