Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
297 commits
Select commit Hold shift + click to select a range
e280c48
Merge pull request #239 from reactjs/sync-80c16779
simsim0709 Aug 13, 2020
87dcdbe
added short url for warning message (#3199)
cylim Aug 14, 2020
a3df961
concurrent-mode-API-reference.md has been commited (#192)
DDOLDDOL Aug 14, 2020
9d415fd
Merge branch 'master' of https://github.com/reactjs/reactjs.org into …
reactjs-translation-bot Aug 17, 2020
f21896a
missing export default for contact.js (#3209)
safarishi Aug 19, 2020
d0587fc
Update link for Glitch: React Starter Kit (#3212)
ankitshaw42 Aug 19, 2020
1cc8aa3
Remove outdated comparison
gaearon Aug 19, 2020
81bfee9
Fix issues on Windows (#3213)
vladar Aug 19, 2020
fb71011
Replace old babel plugin link with new one (#3215)
HKalbasi Aug 19, 2020
019a989
Add React Tutorial (#2916)
jadjoubran Aug 20, 2020
c64ee93
Mentioned that `value` is supported in `<select>` (#3217)
phistuck Aug 20, 2020
e2c2fe2
Sync Reservation Component with CodePen example (#3221)
DarkSuniuM Aug 22, 2020
b9c5996
Add possible element types that accept propTypes (#386)
LAITONEN Aug 23, 2020
860a510
Clarify that synthetic events aren’t exactly the same as native event…
Emuentes Aug 23, 2020
6a1e325
Reference select guide instead of documenting selected attribute (#3224)
eps1lon Aug 23, 2020
d16f1ee
Add next and previous links to Advanced Guides (#540)
Ediiik Aug 23, 2020
b0b5f42
merging all conflicts
reactjs-translation-bot Aug 24, 2020
cd5b2ad
Prefixing `unstable_` (#3226)
shihabus Aug 24, 2020
daf79b7
Update blog post for RC1 (#3231)
gaearon Aug 28, 2020
4763737
Update conferences list based on 2020 COVID cancellations (#3144)
robhrt7 Aug 28, 2020
baa4531
fix link
gaearon Aug 28, 2020
39f09d6
fix more lins
gaearon Aug 28, 2020
f673d85
Add `useLayoutEffect` to those hooks with deps (#3232)
acmu Aug 30, 2020
25cc703
Updating the docs to reflect the fact that React.memo can be used wit…
ktajpuri Aug 30, 2020
6c0dd30
Resolve merge conflict
taehwanno Aug 31, 2020
09d1215
Resolve merge conflict
taehwanno Aug 31, 2020
6a4a500
Resolve merge conflict
taehwanno Aug 31, 2020
55af9ff
Resolve merge conflict
taehwanno Aug 31, 2020
cd458da
Resolve merge conflict
taehwanno Aug 31, 2020
0590d33
Resolve merge conflict
taehwanno Aug 31, 2020
fcb15c2
Merge pull request #240 from reactjs/sync-d16f1ee7
taehwanno Aug 31, 2020
d493015
Fix Navbar covering heading while using anchor in docs (#3235)
kavinvalli Sep 2, 2020
da8ef8b
Explain where act comes from (#3237)
koba04 Sep 2, 2020
d79f1dd
Update UMD build links to match npm (#3239)
dnicolson Sep 2, 2020
657658a
Fix React Native Testing Library link (#3240)
boreyko1 Sep 4, 2020
6149b81
merging all conflicts
reactjs-translation-bot Sep 7, 2020
b24caba
Code the `null` and `undefined` values (#3203)
ngolin Sep 8, 2020
87813db
Resolve merge conflict
taehwanno Sep 8, 2020
9c85bf9
Resolve merge conflict
taehwanno Sep 8, 2020
bd33aa0
Merge pull request #242 from reactjs/sync-657658aa
taehwanno Sep 8, 2020
442dfbd
Add hooks-custom translation (#230)
yumidev Sep 8, 2020
197ea28
Add links to React Conf 2018, 2019 (#3248)
hodovani Sep 11, 2020
ca66ea2
Adds my github and twitter info (#3257)
sethwebster Sep 12, 2020
42d631d
Fix mistranslation (#243)
Kangdyu Sep 13, 2020
2269c4a
Merge branch 'master' of https://github.com/reactjs/ko.reactjs.org in…
seanjun21 Sep 13, 2020
b42b840
Up to #should-i-use-one-or-many-state-variables complete
seanjun21 Sep 14, 2020
954a16f
Fix heading structure in tutorial (#3260)
eps1lon Sep 14, 2020
101e522
merging all conflicts
reactjs-translation-bot Sep 14, 2020
072c016
Up to #can-i-run-an-effect-only-on-updates
seanjun21 Sep 15, 2020
04963de
Resolve merge conflict
taehwanno Sep 15, 2020
2a53933
Resolve merge conflict
taehwanno Sep 15, 2020
31acd76
Merge pull request #244 from reactjs/sync-954a16f1
taehwanno Sep 15, 2020
249d251
Up to #how-to-get-the-previous-props-or-state
seanjun21 Sep 16, 2020
ec07e80
Remove prev/next links from the Advanced Guide (#3269)
heychris Sep 21, 2020
fdd694f
Tweaked v17 blog post effects changes (#3273)
Sep 21, 2020
1becaff
End the banner campaign (#3275)
gaearon Sep 21, 2020
ce5c89a
merging all conflicts
reactjs-translation-bot Sep 21, 2020
fbe147d
docs: :pencil2: fix typo in handling-events.md
warmwhiten Sep 22, 2020
b87d714
Merge pull request #247 from warmwhiten/warmwhiten/fixtypo/handling-e…
taehwanno Sep 22, 2020
211b286
fix typo (#246)
Sep 22, 2020
58c1f1f
Resolve merge conflict
taehwanno Sep 22, 2020
5e7372c
Merge branch 'master' into sync-1becaff6
hg-pyun Sep 22, 2020
de8c49f
Merge pull request #245 from reactjs/sync-1becaff6
taehwanno Sep 22, 2020
4136a13
Update to React 17 RC2 (#3276)
gaearon Sep 22, 2020
b288802
Update RC blog post to use rc2
gaearon Sep 22, 2020
fb65d8c
Blog post: Introducing the New JSX Transform (#3270)
lunaruan Sep 22, 2020
4e4ba15
Clarify
gaearon Sep 22, 2020
da0e066
Update-2020-09-22-introducing-the-new-jsx-transform.md (#3278)
rickyrojas1 Sep 22, 2020
1dd72bc
Link to explainer how to use new JSX transform with CRA 4 (#3280)
elanandkumar Sep 23, 2020
7138aa0
Rename state setter from useText to setText (#3281)
SandroMiguel Sep 23, 2020
a868d86
tweak wording
gaearon Sep 23, 2020
cc44647
fix grammatical errors (#3279)
CSamuelLents Sep 23, 2020
2e02d9c
Add generic banner infrastructure (#3274)
gaearon Sep 25, 2020
32e3c7a
Banner scheduling and snooze functionality (#3283)
Sep 28, 2020
9ac0d92
merging all conflicts
reactjs-translation-bot Sep 28, 2020
d4e2730
Use relative links
lex111 Sep 29, 2020
90ec7e0
Updates to conferences agenda in 2020-21 (#3287)
robhrt7 Sep 29, 2020
8be497d
Update meetups.md (#3267)
integrationvault Sep 29, 2020
ea69990
Add React Wednesdays to the community podcast list (#3241)
tjvantoll Sep 29, 2020
eaa502f
Fix wrong highlighted line numbers in nested Profiler example (#3218)
dtinth Sep 29, 2020
22ca68a
Updated our Istanbul Meetup url (#3186)
wunnle Sep 29, 2020
8a914c9
Update addons-animation.md (#3151)
MkMan Sep 29, 2020
749e063
Update React India 2021 Conference Dates (#3140)
apherio Sep 29, 2020
ad695be
Update meetups.md (#3127)
santiaguf Sep 29, 2020
1f7a4b9
update @babel/plugin-syntax-dynamic-import link (#3046)
stephaniecoates Sep 29, 2020
79bdfa0
Change links to React lifecycle methods diagram to use HTTPS (#2973)
wojtekmaj Sep 29, 2020
1679d68
Remove react summit 2021 dates (#3290)
robhrt7 Sep 29, 2020
c32d6ec
Update 2020-09-22-introducing-the-new-jsx-transform.md (#3277)
EmmanuelPonnudurai Sep 29, 2020
6c7dada
Add React Conf Brasil 2020 (#3284)
ronal2do Sep 29, 2020
ccc8e03
Update code-splitting.md (#3294)
samrobbins85 Sep 30, 2020
df7fbff
Remove superfluous code in faq-functions.md example (#3293)
ajbeaven Sep 30, 2020
f92897b
Updated conditional rendering doc with a note on Falsy values (#3296)
jeswinsimon Oct 1, 2020
ffee0cc
Resolve merge conflict
taehwanno Oct 1, 2020
43b1ccd
Merge pull request #248 from reactjs/sync-32e3c7a6
taehwanno Oct 1, 2020
773500c
add hacktoberfest disclaimer to pr template (#3302)
alexkrolick Oct 1, 2020
aef8fb3
2020 Community survey banner (#3289)
Oct 1, 2020
8515d08
Change datez
gaearon Oct 1, 2020
8f7ffa4
fix pr template line breaks
alexkrolick Oct 1, 2020
930b3ea
merging all conflicts
reactjs-translation-bot Oct 5, 2020
467e104
Resolve merge conflict
taehwanno Oct 7, 2020
d62af06
Resolve merge conflict
taehwanno Oct 7, 2020
095f7ff
Resolve merge conflict
taehwanno Oct 7, 2020
8f5a9a9
Resolve merge conflict
taehwanno Oct 7, 2020
5a598bd
Merge pull request #249 from reactjs/sync-8f7ffa47
taehwanno Oct 7, 2020
879589e
Merge branch 'master' into concurrent-mode-patterns
gnujoow Oct 7, 2020
bf2323f
Update RC blog post to use rc3 (#3312)
iamnapo Oct 8, 2020
8453380
Update design-principles.md (#3314)
TheodoreChu Oct 8, 2020
2c2885c
Add host config
gaearon Oct 8, 2020
772f627
Add redirects
gaearon Oct 8, 2020
7c03b1a
Fix JSON
gaearon Oct 8, 2020
d092516
Fix JSON
gaearon Oct 8, 2020
b1f1366
Fix JSON
gaearon Oct 8, 2020
470c170
Update config
gaearon Oct 8, 2020
491f7ac
Tweak build command
gaearon Oct 9, 2020
07bb013
Add missing word to latest blog post (#3320)
davidblnc Oct 9, 2020
b4a3bc7
Grammar
gaearon Oct 9, 2020
bd0c9d8
Add changelog entry
gaearon Oct 9, 2020
8fa0a44
Merge pull request #224 from Beingbook/concurrent-mode-patterns
hg-pyun Oct 12, 2020
e779d22
merging all conflicts
reactjs-translation-bot Oct 12, 2020
371156e
Remove line breaks to simplify syncs
lex111 Oct 13, 2020
9aeb5a8
Resolve merge conflict
taehwanno Oct 13, 2020
8cfa141
Merge pull request #250 from reactjs/sync-bd0c9d8c
taehwanno Oct 13, 2020
d504604
Fix ajax hooks example (#3322)
knaiskes Oct 13, 2020
ddc3457
Add Kent Dodds's new Epic React course (#3321)
gregalia Oct 13, 2020
8c2865e
fix(content/docs): Fix broken link (#3329)
eziotedeschi Oct 14, 2020
b5003c1
Update for the new releases
gaearon Oct 14, 2020
d78b121
Fix backport typo from 16.14.10 to 16.14.0 (#3334)
jrlarsen Oct 15, 2020
93b3ab9
Add a note for library authors to JSX blog post (#3339)
gaearon Oct 17, 2020
691cce9
Fix the order of fetching data with Suspense (#252)
mu-hun Oct 18, 2020
4e6cee1
Update error code extraction script link (#3319)
elevenpassin Oct 18, 2020
fc613a6
Fix sentences that are less translated (#253)
mu-hun Oct 19, 2020
bb717c7
React 17 blog post (#3335)
gaearon Oct 20, 2020
55f1662
Update to React 17 (#3343)
gaearon Oct 20, 2020
4c9a1b7
Bump object-path from 0.11.4 to 0.11.5 (#3344)
dependabot[bot] Oct 20, 2020
433acaa
Update to 17.0.1
gaearon Oct 22, 2020
64d067f
Remove event pooling and SyntheticEvent#persist from documents (#3207)
koba04 Oct 23, 2020
02d17e4
Update more docs to 17 (#3345)
gaearon Oct 23, 2020
4a62c0a
More docs onFocus and onBlur events (#3044)
ctrlaltdylan Oct 23, 2020
16a03c0
Add note about onScroll in 17
gaearon Oct 23, 2020
6682068
Tweak event delegation notes
gaearon Oct 23, 2020
e0e6cb7
fix typo (#255)
cs09g Oct 26, 2020
f54695e
merging all conflicts
reactjs-translation-bot Oct 26, 2020
21fe4c8
Fix a grammatical error in Context.md (#3352)
sambigelow Oct 26, 2020
1d40cf0
Remove broken Glitch template (#3350)
gaearon Oct 26, 2020
95894a1
specify required option to use Flow with new JSX transform (#3353)
FezVrasta Oct 26, 2020
18ac8f7
minor adjustments to the documentation (#3354)
jhonmike Oct 28, 2020
c9a15fa
Indicate that create react app 4.0 has been released (#3356)
haideralsh Oct 28, 2020
4ca9824
Delete Unnecessary Characters (#257)
writingdeveloper Oct 29, 2020
1f693f9
Resolve merge conflict
taehwanno Oct 31, 2020
8e4b0bc
Fix missing "in" typo (#3359)
snsie Oct 31, 2020
876c8a6
Resolve merge conflict
taehwanno Oct 31, 2020
c2c3e29
Resolve merge conflict
taehwanno Oct 31, 2020
249e17b
Resolve merge conflict
taehwanno Oct 31, 2020
2c89084
Resolve merge conflict
taehwanno Oct 31, 2020
3c09b48
Resolve merge conflict
taehwanno Oct 31, 2020
7dfa589
Resolve merge conflict
taehwanno Oct 31, 2020
442c604
Resolve merge conflict
taehwanno Oct 31, 2020
e8592f1
Merge branch 'master' into sync-66820686
taehwanno Oct 31, 2020
8ae153e
Merge pull request #256 from reactjs/sync-66820686
taehwanno Oct 31, 2020
ce6adab
Update hooks-intro.md (#258)
cs09g Oct 31, 2020
fdba114
docs: translate-styling-and-css (#223)
sukjae Oct 31, 2020
59f13c7
profiler translation pull request (#238)
hIkipooh Oct 31, 2020
f42e272
Remove Hacktoberfest disclaimer from PR template
lex111 Oct 31, 2020
30baecf
ReactJS Athens Meetup (#3333)
KostasApi Oct 31, 2020
32e79bd
merging all conflicts
reactjs-translation-bot Nov 2, 2020
ab2e95f
Update faq-ajax.md (#3363)
toxicinx Nov 2, 2020
757587e
Merge branch 'master' of https://github.com/reactjs/ko.reactjs.org in…
seanjun21 Nov 2, 2020
3b75b7b
Resolve merge conflict
taehwanno Nov 8, 2020
edf1f79
Resolve merge conflict
taehwanno Nov 8, 2020
e8079d8
Resolve merge conflict
taehwanno Nov 8, 2020
79f8f0b
Merge pull request #262 from reactjs/sync-30baecf5
taehwanno Nov 8, 2020
255497f
[docs] Update community docs link to React Native Radio (#3377)
harrisrobin Nov 8, 2020
2e71518
Merge branch 'master' of https://github.com/reactjs/reactjs.org into …
reactjs-translation-bot Nov 9, 2020
ac4254f
Move React Summit 2020 to Past Conferences section (#3378)
JoshuaKGoldberg Nov 10, 2020
9b8dee5
Remove reference to babel-polyfill (#3381)
cosmith Nov 12, 2020
a9239a5
More explicit docs about uncontrolled forms. (#3382)
VoytechG Nov 12, 2020
f595f22
Added reconciliation link. (#2614)
iMohammadReza Nov 12, 2020
38b4c5a
fix date format for firefox (#3384)
alexkrolick Nov 12, 2020
eafba20
docs: document prod vs dev behavior difference in componentDidCatch (…
FezVrasta Nov 14, 2020
fc6e864
Update legacy-event-pooling.md (#3380)
Nov 16, 2020
957276e
Update typechecking-with-proptypes.md with a minor addition (#3386)
01abhishekjain Nov 16, 2020
5ff0a7e
fix typo (#264)
anxiubin Nov 17, 2020
fe67db2
complete all translations for hooks faq
seanjun21 Nov 18, 2020
b6ef8fe
Merge branch 'master' of https://github.com/reactjs/ko.reactjs.org in…
seanjun21 Nov 18, 2020
b236356
fix: typo (#3388)
yuqingc Nov 18, 2020
28e7b10
Update the broken links in the Overview section (#3394)
natenovielli Nov 19, 2020
f44b494
Link to TypeScript 4.1 stable release (#3395)
theMasix Nov 20, 2020
8f9ef00
Add React User Group Albania (#3390)
olsiseferi Nov 21, 2020
446ba51
Add PropType instructions for function components (#3403)
renatodex Nov 25, 2020
bb252ff
Added Toronto meetup group (#3402)
simistern Nov 26, 2020
10cf2a3
Add React JS Milano meetup (#3411)
olsiseferi Nov 27, 2020
bf09ba8
Move React conf Brasil to past conferences and reorder past conferenc…
ShayMurnin Nov 27, 2020
5e437a1
Change tabIndex to match the types (string to number) (#3409)
Nov 30, 2020
1fe2381
Adding Halifax, Nova Scotia to the list of meetups (#3419)
lauchness Dec 2, 2020
e9da0fa
Update strict-mode.md (#3426)
infinnie Dec 4, 2020
c8d1941
Fix typo in Introducing JSX snippet (#3417) (#3418)
Dec 4, 2020
6628335
Update release-channels.md
thinkanddoit Dec 5, 2020
4fc709d
Add React 17 release date to versioning policy (#3428)
danoc Dec 5, 2020
674ca31
merging all conflicts
reactjs-translation-bot Dec 7, 2020
e4b8fe0
Translate to Korean for React Versions (#268)
junghyeonsu Dec 7, 2020
0ebb5b1
Redirect en.reactjs.org to reactjs.org (#3446)
zpao Dec 10, 2020
6349ec1
Bump ini from 1.3.5 to 1.3.8 (#3450)
dependabot[bot] Dec 13, 2020
f91b71d
Resolve merge conflict
taehwanno Dec 13, 2020
c88ef89
Resolve merge conflict
taehwanno Dec 13, 2020
e4b4878
Resolve merge conflict
taehwanno Dec 13, 2020
b56ad41
Resolve merge conflict
taehwanno Dec 13, 2020
61707d4
Resolve merge conflict
taehwanno Dec 13, 2020
dbf0899
Resolve merge conflict
taehwanno Dec 13, 2020
b164c80
Merge pull request #270 from reactjs/sync-4fc709d0
taehwanno Dec 13, 2020
74624f1
Merge branch 'master' of https://github.com/reactjs/reactjs.org into …
reactjs-translation-bot Dec 14, 2020
9236292
first issue: add missing comma (#3452)
gbradleypro Dec 17, 2020
7fc5ee7
Merge branch 'master' into master
hg-pyun Dec 19, 2020
a57d1ff
merging all conflicts
reactjs-translation-bot Dec 21, 2020
53f81dd
Resolve merge conflict
taehwanno Dec 21, 2020
1cdb618
Merge pull request #273 from reactjs/sync-92362925
taehwanno Dec 21, 2020
ed421c0
Server Components blog post
gaearon Dec 21, 2020
bab33b9
Add React Summit remote 2021 (#3451)
robhrt7 Dec 21, 2020
7a11d71
Fix UI feedback when downvoting a page (#3459)
swapnalshahil Dec 22, 2020
1db302a
Merge branch 'master' into master
hg-pyun Dec 27, 2020
34d94ba
Merge branch 'master' of https://github.com/reactjs/reactjs.org into …
reactjs-translation-bot Dec 28, 2020
b4883c3
Bump urijs from 1.19.2 to 1.19.5
dependabot[bot] Dec 31, 2020
82b8c9f
remove componentWillMount/WillReceiveProps (#3475)
amen-souissi Jan 6, 2021
532de4f
Highlight all modified lines in the React forms example (#3486)
Rami-Sabbagh Jan 13, 2021
527f6e5
add v15.6 legacy docs redirect (#3464)
alexkrolick Jan 13, 2021
9e1b8a3
Merge pull request #274 from reactjs/dependabot/npm_and_yarn/urijs-1.…
hg-pyun Jan 14, 2021
0eefcd5
Merge branch 'master' into master
hg-pyun Jan 14, 2021
3844da1
Changed yarn test-prod to yarn test --prod in contributing guide (#3491)
dwesty17 Jan 17, 2021
d35b82c
fix: Remove duplicate conference links (#3493)
iamdarshshah Jan 19, 2021
d13e971
Bump socket.io from 2.3.0 to 2.4.1
dependabot[bot] Jan 21, 2021
f45c5d4
Bump socket.io from 2.3.0 to 2.4.1 (#3494)
dependabot[bot] Jan 21, 2021
ed88a24
Update courses.md (#3495)
jamesknelson Jan 24, 2021
f90e7fb
Merge pull request #277 from reactjs/dependabot/npm_and_yarn/socket.i…
taehwanno Jan 25, 2021
5e2a231
Updated eslint-plugin-react to 7.21.5 & eslint-plugin-jsx-a11y to 6.4…
rrhg Jan 27, 2021
6dc688c
Remove duplicate content and add link
YimJiYoung Jan 28, 2021
fd6791f
Merge pull request #279 from YimJiYoung/fix-duplicate-content
hg-pyun Jan 28, 2021
56adfbd
Merge branch 'master' into master
hg-pyun Jan 29, 2021
eb637ff
Merge branch 'master' into translate/hooks-faq
hg-pyun Jan 29, 2021
00b74a6
Merge pull request #269 from thinkanddoit/master
hg-pyun Jan 29, 2021
cb1932b
Merge branch 'master' into translate/hooks-faq
hg-pyun Jan 29, 2021
99d7070
Merge pull request #265 from seanjun21/translate/hooks-faq
hg-pyun Jan 29, 2021
7b8a9cc
added react/jsx in development flow steps for building react (#3505)
sarangkartikey50 Feb 2, 2021
ea0711e
Fix broken link in how-to-contribute (#3508)
Lakshmi-Narasimha Feb 4, 2021
35179e8
Add Buenos Aires meetup to the list (#3507)
Feb 6, 2021
9bdd71a
merging all conflicts
reactjs-translation-bot Feb 8, 2021
44da919
Update reference-react-component.md (#280)
nh0627 Feb 9, 2021
7be6849
Update higher-order-components.md (#283)
dev-hikun Feb 9, 2021
dd19505
Resolve merge conflict
taehwanno Feb 9, 2021
b1d26b2
Resolve merge conflict
taehwanno Feb 9, 2021
f1efd13
Merge pull request #284 from reactjs/sync-35179e85
taehwanno Feb 9, 2021
0004b82
Translate Advanced Guides > Forwarding Refs (#260)
hapumee Feb 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


<!--

Thank you for the PR! Contributors like you keep React awesome!
Expand Down
11 changes: 10 additions & 1 deletion content/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,15 @@ keyanzhang:
kmeht:
name: Kunal Mehta
url: https://github.com/kmeht
laurentan:
name: Lauren Tan
url: https://twitter.com/sugarpirate_
LoukaN:
name: Lou Husson
url: https://twitter.com/loukan42
lunaruan:
name: Luna Ruan
url: https://twitter.com/lunaruan
matthewjohnston4:
name: Matthew Johnston
url: https://github.com/matthewathome
Expand All @@ -61,6 +67,9 @@ nhunzaker:
petehunt:
name: Pete Hunt
url: https://twitter.com/floydophone
rachelnabors:
name: Rachel Nabors
url: https://twitter.com/rachelnabors
schrockn:
name: Nick Schrock
url: https://twitter.com/schrockn
Expand Down Expand Up @@ -93,4 +102,4 @@ zpao:
url: https://twitter.com/zpao
tomocchino:
name: Tom Occhino
url: https://twitter.com/tomocchino
url: https://twitter.com/tomocchino
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Prior to this release, we stripped out error messages at build-time and this is

> Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.

In order to make debugging in production easier, we're introducing an Error Code System in [15.2.0](https://github.com/facebook/react/releases/tag/v15.2.0). We developed a [gulp script](https://github.com/facebook/react/blob/master/scripts/error-codes/gulp-extract-errors.js) that collects all of our `invariant` error messages and folds them to a [JSON file](https://github.com/facebook/react/blob/master/scripts/error-codes/codes.json), and at build-time Babel uses the JSON to [rewrite](https://github.com/facebook/react/blob/master/scripts/error-codes/replace-invariant-error-codes.js) our `invariant` calls in production to reference the corresponding error IDs. Now when things go wrong in production, the error that React throws will contain a URL with an error ID and relevant information. The URL will point you to a page in our documentation where the original error message gets reassembled.
In order to make debugging in production easier, we're introducing an Error Code System in [15.2.0](https://github.com/facebook/react/releases/tag/v15.2.0). We developed a [script](https://github.com/facebook/react/blob/master/scripts/error-codes/extract-errors.js) that collects all of our `invariant` error messages and folds them to a [JSON file](https://github.com/facebook/react/blob/master/scripts/error-codes/codes.json), and at build-time Babel uses the JSON to [rewrite](https://github.com/facebook/react/blob/master/scripts/error-codes/transform-error-messages.js) our `invariant` calls in production to reference the corresponding error IDs. Now when things go wrong in production, the error that React throws will contain a URL with an error ID and relevant information. The URL will point you to a page in our documentation where the original error message gets reassembled.

While we hope you don't see errors often, you can see how it works [here](/docs/error-decoder.html?invariant=109&args[]=Foo). This is what the same error from above will look like:

Expand Down
8 changes: 4 additions & 4 deletions content/blog/2017-09-08-dom-attributes-in-react-16.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ In React 16, we are making a change. Now, any unknown attributes will end up in
React has always provided a JavaScript-centric API to the DOM. Since React components often take both custom and DOM-related props, it makes sense for React to use the `camelCase` convention just like the DOM APIs:

```js
<div tabIndex="-1" />
<div tabIndex={-1} />
```

This has not changed. However, the way we enforced it in the past forced us to maintain a whitelist of all valid React DOM attributes in the bundle:
Expand All @@ -55,10 +55,10 @@ With the new approach, both of these problems are solved. With React 16, you can

```js
// Yes, please
<div tabIndex="-1" />
<div tabIndex={-1} />

// Warning: Invalid DOM property `tabindex`. Did you mean `tabIndex`?
<div tabindex="-1" />
<div tabindex={-1} />
```

In other words, the way you use DOM components in React hasn't changed, but now you have some new capabilities.
Expand Down Expand Up @@ -120,7 +120,7 @@ Below is a detailed list of them.
* **Known attributes with a different canonical React name:**

```js
<div tabindex="-1" />
<div tabindex={-1} />
<div class="hi" />
```

Expand Down
376 changes: 376 additions & 0 deletions content/blog/2020-08-10-react-v17-rc.md

Large diffs are not rendered by default.

267 changes: 267 additions & 0 deletions content/blog/2020-09-22-introducing-the-new-jsx-transform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
---
title: "Introducing the New JSX Transform"
author: [lunaruan]
---

Although React 17 [doesn't contain new features](/blog/2020/08/10/react-v17-rc.html), it will provide support for a new version of the JSX transform. In this post, we will describe what it is and how to try it.

## What's a JSX Transform? {#whats-a-jsx-transform}

Browsers don't understand JSX out of the box, so most React users rely on a compiler like Babel or TypeScript to **transform JSX code into regular JavaScript**. Many preconfigured toolkits like Create React App or Next.js also include a JSX transform under the hood.

Together with the React 17 release, we've wanted to make a few improvements to the JSX transform, but we didn't want to break existing setups. This is why we [worked with Babel](https://babeljs.io/blog/2020/03/16/7.9.0#a-new-jsx-transform-11154httpsgithubcombabelbabelpull11154) to **offer a new, rewritten version of the JSX transform** for people who would like to upgrade.

Upgrading to the new transform is completely optional, but it has a few benefits:

* With the new transform, you can **use JSX without importing React**.
* Depending on your setup, its compiled output may **slightly improve the bundle size**.
* It will enable future improvements that **reduce the number of concepts** you need to learn React.

**This upgrade will not change the JSX syntax and is not required.** The old JSX transform will keep working as usual, and there are no plans to remove the support for it.


[React 17 RC](/blog/2020/08/10/react-v17-rc.html) already includes support for the new transform, so go give it a try! To make it easier to adopt, **we've also backported its support** to React 16.14.0, React 15.7.0, and React 0.14.10. You can find the upgrade instructions for different tools [below](#how-to-upgrade-to-the-new-jsx-transform).

Now let's take a closer look at the differences between the old and the new transform.

## What’s Different in the New Transform? {#whats-different-in-the-new-transform}

When you use JSX, the compiler transforms it into React function calls that the browser can understand. **The old JSX transform** turned JSX into `React.createElement(...)` calls.

For example, let's say your source code looks like this:

```js
import React from 'react';

function App() {
return <h1>Hello World</h1>;
}
```

Under the hood, the old JSX transform turns it into regular JavaScript:

```js
import React from 'react';

function App() {
return React.createElement('h1', null, 'Hello world');
}
```

>Note
>
>**Your source code doesn't need to change in any way.** We're describing how the JSX transform turns your JSX source code into the JavaScript code a browser can understand.

However, this is not perfect:

* Because JSX was compiled into `React.createElement`, `React` needed to be in scope if you used JSX.
* There are some [performance improvements and simplifications](https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md#motivation) that `React.createElement` does not allow.

To solve these issues, React 17 introduces two new entry points to the React package that are intended to only be used by compilers like Babel and TypeScript. Instead of transforming JSX to `React.createElement`, **the new JSX transform** automatically imports special functions from those new entry points in the React package and calls them.

Let's say that your source code looks like this:

```js
function App() {
return <h1>Hello World</h1>;
}
```

This is what the new JSX transform compiles it to:

```js
// Inserted by a compiler (don't import it yourself!)
import {jsx as _jsx} from 'react/jsx-runtime';

function App() {
return _jsx('h1', { children: 'Hello world' });
}
```

Note how our original code **did not need to import React** to use JSX anymore! (But we would still need to import React in order to use Hooks or other exports that React provides.)

**This change is fully compatible with all of the existing JSX code**, so you won't have to change your components. If you're curious, you can check out the [technical RFC](https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md#detailed-design) for more details about how the new transform works.

> Note
>
> The functions inside `react/jsx-runtime` and `react/jsx-dev-runtime` must only be used by the compiler transform. If you need to manually create elements in your code, you should keep using `React.createElement`. It will continue to work and is not going away.

## How to Upgrade to the New JSX Transform {#how-to-upgrade-to-the-new-jsx-transform}

If you aren't ready to upgrade to the new JSX transform or if you are using JSX for another library, don't worry. The old transform will not be removed and will continue to be supported.

If you want to upgrade, you will need two things:

* **A version of React that supports the new transform** ([React 17 RC](/blog/2020/08/10/react-v17-rc.html) and higher supports it, but we've also released React 16.14.0, React 15.7.0, and React 0.14.10 for people who are still on the older major versions).
* **A compatible compiler** (see instructions for different tools below).

Since the new JSX transform doesn't require React to be in scope, [we've also prepared an automated script](#removing-unused-react-imports) that will remove the unnecessary imports from your codebase.

### Create React App {#create-react-app}

Create React App [4.0.0](https://github.com/facebook/create-react-app/releases/tag/v4.0.0)+ uses the new transform for compatible React versions.

### Next.js {#nextjs}

Next.js [v9.5.3](https://github.com/vercel/next.js/releases/tag/v9.5.3)+ uses the new transform for compatible React versions.

### Gatsby {#gatsby}

Gatsby [v2.24.5](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/CHANGELOG.md#22452-2020-08-28)+ uses the new transform for compatible React versions.

>Note
>
>If you get [this Gatsby error](https://github.com/gatsbyjs/gatsby/issues/26979) after upgrading to React 17 RC, run `npm update` to fix it.

### Manual Babel Setup {#manual-babel-setup}

Support for the new JSX transform is available in Babel [v7.9.0](https://babeljs.io/blog/2020/03/16/7.9.0) and above.

First, you'll need to update to the latest Babel and plugin transform.

If you are using `@babel/plugin-transform-react-jsx`:

```bash
# for npm users
npm update @babel/core @babel/plugin-transform-react-jsx
```

```bash
# for yarn users
yarn upgrade @babel/core @babel/plugin-transform-react-jsx
```

If you are using `@babel/preset-react`:

```bash
# for npm users
npm update @babel/core @babel/preset-react
```

```bash
# for yarn users
yarn upgrade @babel/core @babel/preset-react
```

Currently, the old transform `{"runtime": "classic"}` is the default option. To enable the new transform, you can pass `{"runtime": "automatic"}` as an option to `@babel/plugin-transform-react-jsx` or `@babel/preset-react`:

```js
// If you are using @babel/preset-react
{
"presets": [
["@babel/preset-react", {
"runtime": "automatic"
}]
]
}
```

```js
// If you're using @babel/plugin-transform-react-jsx
{
"plugins": [
["@babel/plugin-transform-react-jsx", {
"runtime": "automatic"
}]
]
}
```

Starting from Babel 8, `"automatic"` will be the default runtime for both plugins. For more information, check out the Babel documentation for [@babel/plugin-transform-react-jsx](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx) and [@babel/preset-react](https://babeljs.io/docs/en/babel-preset-react).

> Note
>
> If you use JSX with a library other than React, you can use [the `importSource` option](https://babeljs.io/docs/en/babel-preset-react#importsource) to import from that library instead -- as long as it provides the necessary entry points. Alternatively, you can keep using the classic transform which will continue to be supported.
>
> If you're a library author and you are implementing the `/jsx-runtime` entry point for your library, keep in mind that [there is a case](https://github.com/facebook/react/issues/20031#issuecomment-710346866) in which even the new transform has to fall back to `createElement` for backwards compatibility. In that case, it will auto-import `createElement` directly from the *root* entry point specified by `importSource`.

### ESLint {#eslint}

If you are using [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react), the `react/jsx-uses-react` and `react/react-in-jsx-scope` rules are no longer necessary and can be turned off or removed.

```js
{
// ...
"rules": {
// ...
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off"
}
}
```

### TypeScript {#typescript}

TypeScript supports the new JSX transform in [v4.1](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#jsx-factories) and up.

### Flow {#flow}

Flow supports the new JSX transform in [v0.126.0](https://github.com/facebook/flow/releases/tag/v0.126.0) and up, by adding `react.runtime=automatic` to your Flow configuration options.

## Removing Unused React Imports {#removing-unused-react-imports}

Because the new JSX transform will automatically import the necessary `react/jsx-runtime` functions, React will no longer need to be in scope when you use JSX. This might lead to unused React imports in your code. It doesn't hurt to keep them, but if you'd like to remove them, we recommend running a [“codemod”](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) script to remove them automatically:

```bash
cd your_project
npx react-codemod update-react-imports
```

>Note
>
>If you're getting errors when running the codemod, try specifying a different JavaScript dialect when `npx react-codemod update-react-imports` asks you to choose one. In particular, at this moment the "JavaScript with Flow" setting supports newer syntax than the "JavaScript" setting even if you don't use Flow. [File an issue](https://github.com/reactjs/react-codemod/issues) if you run into problems.
>
>Keep in mind that the codemod output will not always match your project's coding style, so you might want to run [Prettier](https://prettier.io/) after the codemod finishes for consistent formatting.

Running this codemod will:

* Remove all unused React imports as a result of upgrading to the new JSX transform.
* Change all default React imports (i.e. `import React from "react"`) to destructured named imports (ex. `import { useState } from "react"`) which is the preferred style going into the future. This codemod **will not** affect the existing namespace imports (i.e. `import * as React from "react"`) which is also a valid style. The default imports will keep working in React 17, but in the longer term we encourage moving away from them.

For example,

```js
import React from 'react';

function App() {
return <h1>Hello World</h1>;
}
```

will be replaced with

```js
function App() {
return <h1>Hello World</h1>;
}
```

If you use some other import from React — for example, a Hook — then the codemod will convert it to a named import.

For example,

```js
import React from 'react';

function App() {
const [text, setText] = React.useState('Hello World');
return <h1>{text}</h1>;
}
```

will be replaced with

```js
import { useState } from 'react';

function App() {
const [text, setText] = useState('Hello World');
return <h1>{text}</h1>;
}
```

In addition to cleaning up unused imports, this will also help you prepare for a future major version of React (not React 17) which will support ES Modules and not have a default export.

## Thanks {#thanks}

We'd like to thank Babel, TypeScript, Create React App, Next.js, Gatsby, ESLint, and Flow maintainers for their help implementing and integrating the new JSX transform. We also want to thank the React community for their feedback and discussion on the related [technical RFC](https://github.com/reactjs/rfcs/pull/107).
Loading