Skip to content

update #1

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

Merged
merged 1,159 commits into from
Jun 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1159 commits
Select commit Hold shift + click to select a range
f588bd6
Update "legacy" wording
alexkrolick Mar 23, 2018
ccc1f26
Replace "deprecated" with "legacy" for now
alexkrolick Mar 23, 2018
66287e1
Remove trailing comma
g-akshay Mar 23, 2018
b4cb5b5
Merge pull request #702 from g-akshay/patch-1
alexkrolick Mar 23, 2018
3af89c9
Merge pull request #4 from alexkrolick/context-tweaks
bvaughn Mar 23, 2018
01c2691
Replaced cWRP in forwardRef example with cDU
bvaughn Mar 23, 2018
f5d5139
Formatted a Note
bvaughn Mar 23, 2018
5864093
Updated context-in-lifecycles example
bvaughn Mar 23, 2018
d66d3a2
Updated TODO for later
bvaughn Mar 23, 2018
ef23c49
Updated multi-context example to show more indirection
bvaughn Mar 23, 2018
b25276a
Updated forward-refs example to use class component
bvaughn Mar 23, 2018
c41bb29
Added DevTools name consideration to forwardRef examples
bvaughn Mar 23, 2018
1ead060
17 -> future version
alexkrolick Mar 23, 2018
d58c892
+ "same algo"
alexkrolick Mar 23, 2018
e689824
Add notes about composing multiple contexts
alexkrolick Mar 23, 2018
b3bf0bd
Added getSnapshotBeforeUpdate recipe
bvaughn Mar 23, 2018
509b126
Explain context in lifecycle a bit more
alexkrolick Mar 23, 2018
fe84e09
Explain why you need forwardRef
alexkrolick Mar 23, 2018
9e4442a
typo
alexkrolick Mar 23, 2018
3c44882
Use function keyword
alexkrolick Mar 23, 2018
f9225e2
Remove propTypes
alexkrolick Mar 23, 2018
fb8e9e8
kill class props
alexkrolick Mar 23, 2018
254fc8b
Wordsmithing nits
bvaughn Mar 23, 2018
6919801
Use functional component
alexkrolick Mar 23, 2018
c9d50e3
Remove lib link
alexkrolick Mar 23, 2018
7ac0712
Updated 16.3 blog post to account for getSnapshotBeforeUpdate lifecycle
bvaughn Mar 23, 2018
b0c22f7
Wording tweak
bvaughn Mar 23, 2018
920b4f4
Replace divs with some fake components
alexkrolick Mar 23, 2018
349446d
Add caveats section
alexkrolick Mar 23, 2018
b0e8604
Prettier
alexkrolick Mar 23, 2018
8437e37
Fix syntax
alexkrolick Mar 23, 2018
587ad93
Merge pull request #5 from alexkrolick/16.3-release-blog-post
bvaughn Mar 23, 2018
11c7124
Update the minimal React fiddle resource links in "How to Contribute"…
EcutDavid Mar 24, 2018
c743dc3
Fix typo in reconciliation docs regarding uncontrolled inputs (#705)
yangshun Mar 24, 2018
f11a149
Added DevTools naming consideration to React.forwardRef reference doc…
bvaughn Mar 24, 2018
bd06bbc
Added context HOC example to reference
bvaughn Mar 24, 2018
558d576
Reworked introduction
bvaughn Mar 24, 2018
7425aed
Typofix
bvaughn Mar 24, 2018
65b1496
Typo
bvaughn Mar 24, 2018
6eae811
Tweaks to async post
gaearon Mar 24, 2018
a2139de
Add a note about suspense
gaearon Mar 24, 2018
030980e
Merge pull request #6 from gaearon/tweaks-async-post
bvaughn Mar 24, 2018
e110ac5
Added a small TOC for examples
bvaughn Mar 24, 2018
ce060eb
Imported theme style tweaks from PR 587
bvaughn Mar 24, 2018
e143823
Added create-subscription example
bvaughn Mar 24, 2018
65eca09
Tweaks
bvaughn Mar 25, 2018
d1d2280
Fix grammar mistake in higher-order-components.md
chaficnajjar Mar 26, 2018
858d288
s/function components/functional components (#711)
chaficnajjar Mar 26, 2018
7072a01
Remove redundant "instead" in render-props.html (#712)
chaficnajjar Mar 26, 2018
fff4ba3
s/each are/each is (#713)
chaficnajjar Mar 26, 2018
43b21ef
Merge pull request #710 from chaficnajjar/patch-1
alexkrolick Mar 26, 2018
185080e
Update faq-build.md
wlwl2 Mar 27, 2018
a3ea63a
Merge branch 'master' into update-on-async-rendering
bvaughn Mar 27, 2018
7ced9ce
Renamed blog post
bvaughn Mar 27, 2018
7cf5b58
Wordsmithing
bvaughn Mar 27, 2018
9f72403
Updated gradual migration note
bvaughn Mar 27, 2018
712f4de
Changed wording about app developer to React app developer
bvaughn Mar 27, 2018
4610392
Changes in response to Sophie's feedback
bvaughn Mar 27, 2018
b824bd2
Added getSnapshotBeforeUpdate to the polyfill notes
bvaughn Mar 27, 2018
3832311
Merge pull request #596 from bvaughn/update-on-async-rendering
bvaughn Mar 27, 2018
b7b97c0
Merge branch 'master' into 16.3-release-blog-post
bvaughn Mar 27, 2018
6d77836
Linked to async blog post
bvaughn Mar 27, 2018
e5cf31a
Renamed blog post
bvaughn Mar 27, 2018
cb01f78
Small copy tweaks (#718)
bvaughn Mar 27, 2018
77dae36
Use examples without types in the post (#719)
gaearon Mar 27, 2018
9113b4c
Fixed example props/prevProps
bvaughn Mar 28, 2018
78a2a19
Update 2018-03-27-update-on-async-rendering.md
sophiebits Mar 28, 2018
a84d8e4
This is why you shouldn't Edit on GitHub without review
sophiebits Mar 28, 2018
161339b
Added a note about SSR / cWM
bvaughn Mar 28, 2018
703a145
Revert "Added a note about SSR / cWM"
bvaughn Mar 28, 2018
c35fe4f
Merge pull request #720 from bvaughn/update-on-async-update-again
bvaughn Mar 28, 2018
45b5a20
Fix mistake in integrating-with-other-libraries.md
chaficnajjar Mar 28, 2018
ae1d8e7
Fix typo in integrating-with-other-libraries.md
chaficnajjar Mar 28, 2018
36e5fe3
s/Mozilla Developer Network/MDN Web Docs (#728)
chaficnajjar Mar 28, 2018
e2a63bb
20,000 => 50,000
gaearon Mar 28, 2018
8006e2d
Merge pull request #688 from raunofreiberg/fix/footer-nav-links-title
alexkrolick Mar 28, 2018
6728531
Merge pull request #723 from chaficnajjar/patch-1
alexkrolick Mar 28, 2018
3a2ad77
Merge pull request #722 from chaficnajjar/patch-1
alexkrolick Mar 28, 2018
95f2a18
Added a note about mirroring props in state and no prevProps on gDSFP
bvaughn Mar 28, 2018
6afbc7b
Added side effects props change example
bvaughn Mar 28, 2018
2e76743
Merge pull request #730 from bvaughn/update-on-async-updates-again-an…
bvaughn Mar 28, 2018
a29098e
Merge branch 'master' into 16.3-release-blog-post
bvaughn Mar 28, 2018
8c79709
Update faq-build.md
wlwl2 Mar 29, 2018
eb60d5a
Merge pull request #714 from wlwl2/patch-1
alexkrolick Mar 29, 2018
57eb7cc
Tweaked message about what goes into state
bvaughn Mar 29, 2018
28b2b76
Tweaked state-and-lifecycle wording more
bvaughn Mar 29, 2018
691cd45
Added inline child function caveat to Context docs
bvaughn Mar 29, 2018
032576c
Prettier
bvaughn Mar 29, 2018
797a792
Revert "Prettier"
bvaughn Mar 29, 2018
3a36a40
Revert "Added inline child function caveat to Context docs"
bvaughn Mar 29, 2018
e5ca13e
Cross-link to async update post
bvaughn Mar 29, 2018
992a756
Missing 'we'
bvaughn Mar 29, 2018
5a587d1
Tweaked link to Context API
bvaughn Mar 29, 2018
ac1d767
Fixed link
bvaughn Mar 29, 2018
aa9810f
Fixed some links and improved a recommendation
bvaughn Mar 29, 2018
b618684
Merge pull request #587 from bvaughn/16.3-release-blog-post
bvaughn Mar 29, 2018
fc9936f
Updated site constants to 16.3
bvaughn Mar 29, 2018
63e0e91
Merge pull request #734 from bvaughn/update-version
bvaughn Mar 29, 2018
2a97018
Wording tweaks
bvaughn Mar 29, 2018
221b7be
nit
bvaughn Mar 29, 2018
e86caae
Merge pull request #735 from bvaughn/wording-tweaks
bvaughn Mar 29, 2018
4250435
Merge pull request #700 from billyjanitsch/clarify-render-prop
Mar 29, 2018
99d5ce4
Replaced hyphen with em dash
bvaughn Mar 29, 2018
73ba23f
Updated createRef example not to use class property syntax
bvaughn Mar 29, 2018
ab436cc
Add missing "and"
gaearon Mar 29, 2018
e864607
Absolute link
alexkrolick Mar 30, 2018
d5c449d
React.forwardRef accepts a render function, not Functional Component
koba04 Mar 30, 2018
c72935a
prettier
koba04 Mar 30, 2018
b1d705a
Use correct component name in context doc example (#740)
CMTegner Mar 30, 2018
72fd7ff
Update accessibility.md (#708)
tsvetta Mar 30, 2018
2bd8eda
Update refs-and-the-dom.md
gaearon Mar 30, 2018
62638c8
Fix broken link in UNSFE_componentWillReceiveProps docs. (#744)
Anveio Mar 30, 2018
51a864d
Fix cDU to correctly make async request
nateq314 Mar 30, 2018
a5a622e
a11y-doc: Adjust Focus Control to new 16.3 refs + link fixes. (#742)
AlmeroSteyn Mar 30, 2018
85f3666
Merge pull request #745 from nateq314/patch-1
bvaughn Mar 30, 2018
e61d594
Minor: context/theme-detailed-app.js broken (#746)
onpaws Mar 30, 2018
17d04ac
Fix: added missing component instantiation within the 'forwardRef' AP…
tgallacher Mar 31, 2018
abd3af9
Recommend getDerivedStateFromProps (#747)
chucksellick Mar 31, 2018
c1c9714
Update context.md (#751)
Apr 1, 2018
82a4021
Fixed broken URL (#750)
cristigar Apr 1, 2018
e8cdf51
Fix button => themed-buton (#752)
chayeoi Apr 1, 2018
2e1554d
Adopt bvaughn's example
koba04 Apr 2, 2018
dbe5b49
Fix a very small typo (#754)
chucksellick Apr 2, 2018
0ea7d99
Revert "Adopt bvaughn's example"
koba04 Apr 2, 2018
4a2a854
Merge pull request #738 from koba04/forward-ref-examples
bvaughn Apr 2, 2018
3d50f0d
Add contributing guidelines reference to readme (#753)
raunofreiberg Apr 2, 2018
9948cc9
Add createRef to top level API section
raunofreiberg Apr 2, 2018
3709c8e
Add link to refs-and-the-dom in description
raunofreiberg Apr 2, 2018
1f21aaa
Update introducing-jsx.md (#761)
rk162 Apr 3, 2018
cf7329d
Tweak wording
gaearon Apr 3, 2018
1dccf07
~the~
alexkrolick Apr 3, 2018
861544b
Move createRef above forwardRef
alexkrolick Apr 3, 2018
17efddc
Merge pull request #756 from raunofreiberg/createref-docs
alexkrolick Apr 3, 2018
ec718a3
Updated react-lifecycles-compat example to show 2.0 named export
bvaughn Apr 3, 2018
b6c0a51
React 16.3.1 (#765)
gaearon Apr 4, 2018
f7cf140
Tweak context docs (#766)
gaearon Apr 4, 2018
c4bf6b0
Merge pull request #764 from bvaughn/react-lifecycles-compat-v2
bvaughn Apr 5, 2018
9343241
Fixed typo in conferences (#768)
bevanmw Apr 5, 2018
9c39cb1
add reference to react-testing-library
Apr 5, 2018
17f2a6f
Update addons-test-utils.md
Apr 5, 2018
79987d2
Merge pull request #769 from kentcdodds/patch-2
alexkrolick Apr 5, 2018
e1689b0
Move constructor out of render
codecrutch Apr 5, 2018
9c9cee0
Merge pull request #771 from codecrutch/fix-createref-example
alexkrolick Apr 5, 2018
7f522ca
add ReactBolivia meetup. (#774)
maudel Apr 6, 2018
4f5d4b0
nit: minor reordering of words (#772)
raunofreiberg Apr 6, 2018
6c22a43
Clarify when Consumers get the default value (#770)
alexkrolick Apr 6, 2018
c0deab9
Add available conference video playlists (2017~2018.3)
whitedogg13 Apr 6, 2018
1466232
Tweak context
gaearon Apr 6, 2018
fc97bb5
Merge pull request #775 from whitedogg13/add-conference-videos
alexkrolick Apr 6, 2018
6dd6ed9
Add #react_byteconf_2018 to conferences.md (#777)
kristianfreeman Apr 6, 2018
e4941f6
Added example for updating nested context consumer (#776)
tjallingt Apr 7, 2018
5ba8e04
Merge pull request #748 from tgallacher/fix/blog-react-v-16-3
bvaughn Apr 8, 2018
6521a65
Added updating nested context default value example (#780)
tjallingt Apr 9, 2018
827ade1
fixed 2 cases of "it's" where it should be "its" (#782)
jfrancos Apr 9, 2018
7ab54e2
Remove too much highlighting in a small snippet
gaearon Apr 9, 2018
71a319e
Fix typo — from "node" to "community"
fazlerocks Apr 9, 2018
935c25c
Merge pull request #784 from fazlerocks/patch-1
bvaughn Apr 10, 2018
c37006c
Use the official talk video from YouTube (#790)
gaearon Apr 10, 2018
d7f675d
"efficient" is vague
alexkrolick Apr 10, 2018
f450adb
Add a section "Displaying a custom name in DevTools"
koba04 Apr 4, 2018
e26547b
Wording nit
bvaughn Apr 11, 2018
d453c2c
Merge pull request #767 from koba04/customizing-display-name-ref-forw…
bvaughn Apr 11, 2018
41d2641
Update date for #byteconf_react_2018 (#795)
kristianfreeman Apr 11, 2018
7351d11
Fixed invalid getSnapshotBeforeUpdate() example code (#799)
bvaughn Apr 13, 2018
dab9b8b
Add 'visual components' use case for forwarding refs (#798)
duailibe Apr 13, 2018
5433a47
Added redirects for old React versions
bvaughn Apr 13, 2018
94ebecd
Typo
gaearon Apr 13, 2018
04124cc
Promote ref forwarding in "DOM and Refs" (#802)
gaearon Apr 13, 2018
597fe25
Added robots.txt to prevent crawling old versions of site
bvaughn Apr 13, 2018
ae0b953
Added version drop-down toggle (that I will replace in a moment)
bvaughn Apr 13, 2018
8e45c4b
Added versions page with links to recent releases
bvaughn Apr 13, 2018
48a92c5
Moved versions control into versions.yml and Gatsby plug-in
bvaughn Apr 13, 2018
a93acdf
Moved Conferences to Past Conferences (#806)
jyash97 Apr 14, 2018
d184d02
Added links to old release changelogs also
bvaughn Apr 14, 2018
6c094ab
Minor tidying up of the gatsby-transformer-versions-yaml plugin
bvaughn Apr 14, 2018
7843bbe
Testing a 200 redirect proxy
bvaughn Apr 15, 2018
fbbddee
Removing redirect proxy test
bvaughn Apr 15, 2018
88bf29d
Added 16.3 changelog to version links
bvaughn Apr 15, 2018
0b2fac9
React 16.3.2
gaearon Apr 16, 2018
631f32c
Replaced 16.3.1 link with 16.3.2
bvaughn Apr 16, 2018
0b0ba26
Merge pull request #811 from reactjs/gaearon-patch-19
bvaughn Apr 16, 2018
5593059
docs(refs-and-the-dom): typo in CustomTextInput (#813)
mbsrc Apr 17, 2018
ec44237
Merge pull request #801 from bvaughn/versions
bvaughn Apr 17, 2018
233d74e
docs(error-boundaries):remove react beta reference (#815)
Apr 17, 2018
f461942
Minor wording tweak for Versions page (#816)
gaearon Apr 17, 2018
a4aa510
docs(error-boundaries):fix react blog link (#817)
Apr 17, 2018
e32847f
Add a defaultValue for context example
gaearon Apr 18, 2018
cad9c0e
Prettier
bvaughn Apr 18, 2018
b4b6846
Dropped patch number from version list
bvaughn Apr 18, 2018
380225e
add chromevox to a11y documentation
jlr7245 Apr 12, 2018
ed255e6
Fix grammar
tianhuil Apr 22, 2018
0a2ec4a
Merge pull request #831 from tianhuil/patch-1
alexkrolick Apr 22, 2018
cd4bc8b
Merge pull request #797 from jlr7245/jlr7245-add-chromevox
AlmeroSteyn Apr 23, 2018
0a898a0
Adding react-beautiful-dnd link (#836)
alexreardon Apr 23, 2018
1c9b613
Add missing semicolon in example code (#835)
Klaasvaak Apr 23, 2018
049c401
Linked to an example "from scratch" implementation (#837)
Apr 24, 2018
b147d01
new "Flow" URL (#838)
Apr 24, 2018
f40682a
new "Flow" URL (2) (#839)
Apr 25, 2018
983af68
Updated position of ReactFoo Mumbai (#842)
booleanbalaji Apr 25, 2018
f1bdc96
Replace meeting notes section with RFCS section (#848)
augbog Apr 27, 2018
19b16af
Link to new Next.js website
gaearon Apr 28, 2018
fc99015
swap example theme colors (#851)
souporserious Apr 29, 2018
f97629e
Fix grammar in List and Keys documentation (#854)
chesterlaw Apr 30, 2018
3279bd7
Fix JSX link in design principles section (#855)
raunofreiberg Apr 30, 2018
e3cf355
Tweak componentWillReceiveProps docs (#856)
gaearon May 1, 2018
d0cdc9e
Fix elmish-react link on static-type-checking (#857)
xuanduc987 May 2, 2018
c434be8
Fix broken link. (#861)
numb86 May 4, 2018
7a02c31
Repeating link to main website corrected
VinayakBagaria May 7, 2018
c95de8b
Clarify defaultValue usage (#868)
alexkrolick May 8, 2018
d24fa62
add Pittsburgh ReactPGH meetup to meetups.md (#871)
douglas-mason May 9, 2018
f03e9c7
"Introducing JSX" is missing a step (#812)
stmoreau May 9, 2018
28ae03b
Merge pull request #869 from VinayakBagaria/patch-1
bvaughn May 9, 2018
30ea17e
Component Workbenches: Update Neutrino component preset URL (#872)
edmorley May 10, 2018
1f8fdac
doc: add createRef to Refs glossary (#875)
tungv May 12, 2018
69636a4
removed extra curly bracket (#885)
berzavlu May 15, 2018
0201237
add React Day Berlin 2018 (#883)
robhrt7 May 15, 2018
1b5cf20
add #detecting legacy context apis for strict mode post
cyan33 May 17, 2018
5ce098c
refactor the wording
cyan33 May 17, 2018
9b72ba6
Add a sentence to the end of componentWillUnmount() (#894)
barnonahill May 20, 2018
1d5217a
Clarify change propagation in Context API (#896)
danburzo May 21, 2018
822fc42
Merge pull request #891 from cyan33/warn-legacy-context-in-strict-mode
bvaughn May 22, 2018
06f8553
Fixes typo (#902)
pushpinder107 May 23, 2018
57a2317
[WIP] 16.4 blog post
acdlite May 23, 2018
a3cff20
Update date in filename
acdlite May 23, 2018
6a45317
Fix controlled state example
acdlite May 23, 2018
665ccbf
Missing closing quotation in line 225 for <Button /> (#905)
johndhpark May 23, 2018
69d46aa
Tweak gDSFP section
acdlite May 23, 2018
988a677
Add section about Pointer Events
philipp-spiess Apr 11, 2018
a1f41f6
Don’t recommend PEP because it lacks features
philipp-spiess May 16, 2018
1dfdfd8
Pointer events section
acdlite May 23, 2018
983476e
Update getDerivedStateFromProps docs
acdlite May 23, 2018
3c36461
Updated gatsby-config to add Code Sandbox dependencies
May 23, 2018
88fb235
More edits
acdlite May 23, 2018
55b2511
Add pointer events example
acdlite May 23, 2018
73006fe
Add an "oops!" so skimmers don't mistake the bad example for a good one
acdlite May 23, 2018
728f746
Sophie's edit to gDSFP section
acdlite May 23, 2018
0fe6a79
More Sophie edits
acdlite May 24, 2018
68dec67
Remove pointer events example
acdlite May 24, 2018
30be0d0
Add back pointer events example
acdlite May 24, 2018
dc0ed4b
since -> because
acdlite May 24, 2018
dfaf1ee
Merge pull request #904 from acdlite/16.4-release-post
acdlite May 24, 2018
7c81314
Fix spelling of Phillip's name
acdlite May 24, 2018
3252b74
Fix spelling of Philipp's name (again)
acdlite May 24, 2018
aaf2642
Add section about Pointer Events (#792)
philipp-spiess May 24, 2018
1de600d
React 16.4.0 (#907)
NMinhNguyen May 24, 2018
ee4c4fa
Link to MDN article on browser pointer events (#908)
May 24, 2018
3e80980
Renamed params for gDSFP
May 25, 2018
db71d03
Merge pull request #910 from bvaughn/rename-gdsfp-params
bvaughn May 25, 2018
3e87993
Move static type checking above PropTypes
sophiebits May 29, 2018
9511271
fix link to anchor #unsafe_componentwillupdate (#920)
gontard May 31, 2018
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
22 changes: 22 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:latest
steps:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- dependencies-
- run:
name: Install
command: yarn install
- save_cache:
paths:
- node_modules
key: dependencies-{{ checksum "package.json" }}
- run:
name: Check Prettier, ESLint, Flow
command: yarn ci-check
5 changes: 4 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ node_modules/*
content/*

# Ignore built files
public/*
public/*

# Ignore examples
examples/*
13 changes: 12 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
{
"extends": [
"fbjs"
],
"plugins": [
"prettier",
"react"
],
"parser": "babel-eslint",
}
"rules": {
"relay/graphql-naming": 0,
"max-len": 0
},
"env": {
"node": true,
"browser": true
}
}
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


<!--

Thank you for the PR! Contributors like you keep React awesome!

Please see the Contribution Guide for guidelines:

https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md

If your PR references an existing issue, please add the issue number below

-->
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.cache
.DS_STORE
.idea
node_modules
public
public
8 changes: 8 additions & 0 deletions .prettierrc.examples
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"bracketSpacing": false,
"jsxBracketSameLine": true,
"parser": "flow",
"printWidth": 60,
"singleQuote": true,
"trailingComma": "es5"
}
139 changes: 139 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Contributing

Thank you for your interest in contributing to the React Docs!

## Code of Conduct

Facebook has adopted a Code of Conduct that we expect project
participants to adhere to. Please [read the full text](https://code.facebook.com/codeofconduct)
so that you can understand what actions will and will not be tolerated.

## Guidelines for Text

**Different sections intentionally have different styles.**

The documentation is divided into sections to cater to different learning styles and use cases. When editing an article, try to match the surrounding text in tone and style. When creating a new article, try to match the tone of the other articles in the same section. Learn about the motivation behind each section below.

**[Tutorial](https://reactjs.org/tutorial/tutorial.html)** is relatively informal, and is designed for people who prefer a hands-on approach to learning, and can tolerate skipping theory in favor of practice. Its goal is to give the reader a feel for a typical React workflow rather than to explain fundamentals in detail. Here we focus on *what* to do and spend less time on *how* or *why* we did it. It is extremely important to do a lot of hand-holding and unambiguously describe every single change. It should be possible for a beginner to mechanically follow every instruction, and still get to a working tic-tac-toe game.

**[Quick Start](https://reactjs.org/docs/hello-world.html)** is designed to introduce fundamental concepts in a step-by-step way. Each individual article in Quick Start builds on the knowledge from the previous ones, so make sure not to add any "cyclical dependencies" between them. It is important that the reader can start with the first article and work their way to the last Quick Start article without ever having to "look ahead" for a definition. This explains some ordering choices (e.g. that state is explained before events, or that "thinking in React" doesn't use refs). Quick Start also serves as a reference manual for React concepts, so it is important to be very strict about their definitions and relationships between them. This is, for example, why we introduce elements before components. Resist adding too much detail to Quick Start articles. They intentionally don't cover all corner cases, and focus on establishing firm foundations.

**[Advanced Guides](https://reactjs.org/docs/jsx-in-depth.html)** are deep dives into topics that aren't essential for a beginner developer but that everyone bumps into sooner or later. They don't have a specific order, and target more experienced developers. If you have a set of recipes fitting a particular use case, and those recipes aren't opinionated (most React users would agree on them), this is the place to add them.

**[Reference](https://reactjs.org/docs/react-api.html)** is organized by APIs rather than concepts. It is intended to be exhaustive. Any corner cases or recommendations that were skipped for brevity in Quick Start or Advanced Guides should be mentioned in the reference documentation for the corresponding APIs.

**[Contributing](https://reactjs.org/docs/how-to-contribute.html)** should stay up-to-date and be friendly to relatively experienced developers.

**[FAQ](https://reactjs.org/docs/faq-ajax.html)** has a more conversational tone than the other sections. Here, it's fine to include some content that's not primarily concerned with React, as long as React users are overwhelmingly interested in it (e.g. recommendations on directory structure). It's also okay to show more than a single way to do something in the FAQ, and briefly discuss the tradeoffs. The FAQ prioritizes unblocking people with a working solution over explaining concepts in detail, and can be more opinionated than the rest of the docs, even providing popular library recommendations.

**Try to follow your own instructions.**

When writing step-by-step instructions (e.g. how to install something), try to forget everything you know about the topic, and actually follow the instructions you wrote, a single step at time. Often you will discover that there is implicit knowledge that you forgot to mention, or that there are missing or out-of-order steps in the instructions. Bonus points for getting *somebody else* to follow the steps and watching what they struggle with. Often it would be something very simple that you have not anticipated.

## Guidelines for Code Examples

### Syntax

#### Prefer JSX to `createElement`.

Ignore this if you're specifically describing `createElement`.

#### Use `const` where possible, otherwise `let`. Don't use `var`.

Ignore this if you're specifically writing about ES5.

#### Don't use ES6 features when equivalent ES5 features have no downsides.

Remember that ES6 is still new to a lot of people. While we use it in many places (`const` / `let`, classes, arrow functions), if the equivalent ES5 code is just as straightforward and readable, consider using it.

In particular, you should prefer named `function` declarations over `const myFunction = () => ...` arrows for top-level functions. However, you *should* use arrow functions where they provide a tangible improvement (such as preserving `this` context inside a component). Consider both sides of the tradeoff when deciding whether to use a new feature.

#### Don't use features that aren't standardized yet.

For example, **don't** write this:

```js
class MyComponent extends React.Component {
state = {value: ''};
handleChange = (e) => {
this.setState({value: e.target.value});
};
}
```

Instead, **do** write this:

```js
class MyComponent extends React.Component {
constructor(props) {
super(props)
this.handleChange = this.handleChange.bind(this);
this.state = {value: ''};
}
handleChange(e) {
this.setState({value: e.target.value});
}
}
```

Ignore this rule if you're specifically describing an experimental proposal. Make sure to mention its experimental nature in the code and in the surrounding text.

### Style

- Use semicolons.
- No space between function names and parens (`method() {}` not `method () {}`).
- When in doubt, use the default style favored by [Prettier](https://prettier.io/playground/).

### Highlighting

Use `js` as the highlighting language in Markdown code blocks:

````
```js
// code
```
````

Sometimes you'll see blocks with numbers.
They tell the website to highlight specific lines.

You can highlight a single line:

````
```js{2}
function hello() {
// this line will get highlighted
}
```
````

A range of lines:

````
```js{2-4}
function hello() {
// these lines
// will get
// highlighted
}
```
````

Or even multiple ranges:

````
```js{2-4,6}
function hello() {
// these lines
// will get
// highlighted
console.log('hello');
// also this one
console.log('there');
}
```
````

Be mindful that if you move some code in an example with highlighting, you also need to update the highlighting.

Don't be afraid to often use highlighting! It is very valuable when you need to focus the reader's attention on a particular detail that's easy to miss.
21 changes: 0 additions & 21 deletions LICENSE.md

This file was deleted.

18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ This repo contains the source code and documentation powering [reactjs.org](http
1. Git
1. Node: install version 8.4 or greater
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
1. A clone of the [reactjs.org repo](https://github.com/reactjs/reactjs.org) on your local machine
1. A fork of the repo (for any contributions)
1. A clone of the [reactjs.org repo](https://github.com/reactjs/reactjs.org) on your local machine

### Installation

1. `cd reactjs.org` to go into the project root
1. `yarn` to install the website's NPM dependencies
1. `yarn` to install the website's npm dependencies

### Running locally

Expand All @@ -24,6 +24,10 @@ This repo contains the source code and documentation powering [reactjs.org](http

## Contributing

### Guidelines

The documentation is divided into several sections with a different tone and purpose. If you plan to write more than a few sentences, you might find it helpful to get familiar with the [contributing guidelines](https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md#guidelines-for-text) for the appropriate sections.

### Create a branch

1. `git checkout master` from any folder in your local `reactjs.org` repository
Expand All @@ -41,15 +45,21 @@ This repo contains the source code and documentation powering [reactjs.org](http
### Test the change

1. If possible, test any visual changes in all latest versions of common browsers, on both desktop and mobile.
1. Run `yarn check-all` from the project root. (This will run Prettier, ESlint, and Flow.)
1. Run `yarn check-all` from the project root. (This will run Prettier, ESLint, and Flow.)

### Push it

1. `git add -A && git commit -m "My message"` (replacing `My message` with a commit message, such as `Fixed header logo on Android`) to stage and commit your changes
1. `git push my-fork-name the-name-of-my-branch`
1. Go to the [reactjs.org repo](https://github.com/reactjs/reactjs.org) and you should see recently pushed branches.
1. Follow GitHub's instructions.
1. If possible include screenshots of visual changes. A Netlify build will also be automatically created once you make your PR so other people can see your change.
1. If possible, include screenshots of visual changes. A Netlify build will also be automatically created once you make your PR so other people can see your change.

## Translation

If you are interesting in translating `reactjs.org`, please join the Crowdin.

* [Crowdin - React](https://crowdin.com/project/react)

## Troubleshooting

Expand Down
8 changes: 7 additions & 1 deletion content/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ acdlite:
benigeri:
name: Paul Benigeri
url: https://github.com/benigeri
bvaughn:
name: Brian Vaughn
url: https://github.com/bvaughn
chenglou:
name: Cheng Lou
url: https://twitter.com/_chenglou
clemmy:
name: Clement Hoang
url: https://twitter.com/c8hoang
Daniel15:
name: Daniel Lo Nigro
url: http://dan.cx/
Expand Down Expand Up @@ -63,7 +69,7 @@ sebmarkbage:
url: https://twitter.com/sebmarkbage
sophiebits:
name: Sophie Alpert
url: https://sophiealpert.com
url: https://sophiebits.com/
steveluscher:
name: Steven Luscher
url: https://twitter.com/steveluscher
Expand Down
2 changes: 1 addition & 1 deletion content/blog/2013-06-05-why-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ some pretty cool things with it:
(including IE8) and automatically use
[event delegation](http://davidwalsh.name/event-delegate).

Head on over to https://reactjs.org to check out what we have
Head on over to [https://reactjs.org](https://reactjs.org) to check out what we have
built. Our documentation is geared towards building apps with the framework,
but if you are interested in the nuts and bolts
[get in touch](/support.html) with us!
Expand Down
2 changes: 1 addition & 1 deletion content/blog/2014-10-16-react-v0.12-rc1.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ We've also published version `0.12.0-rc1` of the `react` and `react-tools` packa

## React Elements

The biggest conceptual change we made in v0.12 is the move to React Elements. [We talked about this topic in depth earlier this week](/blog/2014/10/14/introducting-react-elements.html). If you haven't already, you should read up on the exciting changes in there!
The biggest conceptual change we made in v0.12 is the move to React Elements. [We talked about this topic in depth earlier this week](/blog/2014/10/14/introducing-react-elements.html). If you haven't already, you should read up on the exciting changes in there!


## JSX Changes
Expand Down
2 changes: 1 addition & 1 deletion content/blog/2015-03-30-community-roundup-26.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Jay Garcia spent a lot of time during the beta working on a NES music player wit

## React Native with Babel and webpack

React Native ships with a custom packager and custom ES6 transforms instead of using what the open source community settled on such as webpack and Babel. The main reason for this is performance – we couldn't get those tools to have sub-second reload time on a large codebase.
React Native ships with a custom packager and custom ES6 transforms instead of using what the open source community settled on such as [webpack](https://webpack.js.org/) and [Babel](https://babeljs.io/). The main reason for this is performance – we couldn't get those tools to have sub-second reload time on a large codebase.

Roman Liutikov found a way to [use webpack and Babel to run on React Native](https://github.com/roman01la/react-native-babel)! In the future, we want to work with those projects to provide cleaner extension mechanisms.

Expand Down
2 changes: 1 addition & 1 deletion content/blog/2015-07-03-react-v0.14-beta-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This week, many people in the React community are at [ReactEurope](https://www.r

With React 0.14, we're continuing to let React mature and to make minor changes as the APIs continue to settle down. I'll talk only about the two largest changes in this blog post; when we publish the final release we'll be sure to update all of our documentation and include a full changelog.

You can install the new beta with `npm install [email protected]` and `npm install [email protected]`. As mentioned in [Deprecating react-tools](https://reactjs.org/blog/2015/06/12/deprecating-jstransform-and-react-tools.html), we're no longer updating the react-tools package so this release doesn't include a new version of it. Please try the new version out and let us know what you think, and please do file issues on our GitHub repo if you run into any problems.
You can install the new beta with `npm install [email protected]` and `npm install [email protected]`. As mentioned in [Deprecating react-tools](/blog/2015/06/12/deprecating-jstransform-and-react-tools.html), we're no longer updating the react-tools package so this release doesn't include a new version of it. Please try the new version out and let us know what you think, and please do file issues on our GitHub repo if you run into any problems.

## Two Packages

Expand Down
2 changes: 1 addition & 1 deletion content/blog/2015-12-16-ismounted-antipattern.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ If you use ES6 promises, you may need to wrap your promise in order to make it c

```js
const cancelablePromise = makeCancelable(
new Promise(r => component.setState({...}}))
new Promise(r => component.setState({...}))
);

cancelablePromise
Expand Down
6 changes: 3 additions & 3 deletions content/blog/2017-04-07-react-v15.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jscodeshift -t react-codemod/transforms/React-PropTypes-to-prop-types.js <path>

The `propTypes`, `contextTypes`, and `childContextTypes` APIs will work exactly as before. The only change is that the built-in validators now live in a separate package.

You may also consider using [Flow](https://flow.org/) to statically type check your JavaScript code, including [React components](https://flow.org/en/docs/frameworks/react/#setup-flow-with-react-a-classtoc-idtoc-setup-flow-with-react-hreftoc-setup-flow-with-reacta).
You may also consider using [Flow](https://flow.org/) to statically type check your JavaScript code, including [React components](https://flow.org/en/docs/react/components/).

### Migrating from React.createClass

Expand Down Expand Up @@ -113,8 +113,8 @@ We're discontinuing active maintenance of React Addons packages. In truth, most
- **react-addons-create-fragment** – React 16 will have first-class support for fragments, at which point this package won't be necessary. We recommend using arrays of keyed elements instead.
- **react-addons-css-transition-group** - Use [react-transition-group/CSSTransitionGroup](https://github.com/reactjs/react-transition-group) instead. Version 1.1.1 provides a drop-in replacement.
- **react-addons-linked-state-mixin** - Explicitly set the `value` and `onChange` handler instead.
- **react-addons-pure-render-mixin** - Use [`React.PureComponent`](/docs/react-api.html#react.purecomponent) instead.
- **react-addons-shallow-compare** - Use [`React.PureComponent`](/docs/react-api.html#react.purecomponent) instead.
- **react-addons-pure-render-mixin** - Use [`React.PureComponent`](/docs/react-api.html#reactpurecomponent) instead.
- **react-addons-shallow-compare** - Use [`React.PureComponent`](/docs/react-api.html#reactpurecomponent) instead.
- **react-addons-transition-group** - Use [react-transition-group/TransitionGroup](https://github.com/reactjs/react-transition-group) instead. Version 1.1.1 provides a drop-in replacement.
- **react-addons-update** - Use [immutability-helper](https://github.com/kolodny/immutability-helper) instead, a drop-in replacement.
- **react-linked-input** - Explicitly set the `value` and `onChange` handler instead.
Expand Down
2 changes: 1 addition & 1 deletion content/blog/2017-09-08-dom-attributes-in-react-16.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Below is a detailed list of them.
```

React 15: Converts `NaN`s to strings and passes them through.
React 16: Warns and ignores them.
React 16: Converts `NaN`s to strings and passes them through with a warning.

While testing this release, we have also [created an automatically generated table](https://github.com/facebook/react/blob/master/fixtures/attribute-behavior/AttributeTableSnapshot.md) for all known attributes to track potential regressions.

Expand Down
Loading