chore: update React examples to match with the new React guidelines#12217
chore: update React examples to match with the new React guidelines#12217SimenB merged 15 commits intojestjs:mainfrom
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 |
|
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
functionexpressions 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_docsas they could be released in the next release.Test plan
Examples in the docs are showing up nicely on
next.