Dan Abramov
425cb9a429
Terminology: Lifecycle hooks -> Lifecycle methods ( #1237 )
6 years ago
Michael McGahan
cf628304bb
Change name of setState updater first arg to 'state' ( #1155 )
6 years ago
Andre Wiggins
5775f070e2
Add signature to getSnapshotBeforeUpdate section ( #1032 )
Add the signature for `getSnapshotBeforeUpdate` to its section, just like all other lifecycle method sections have.
7 years ago
Stephen Lau
61a8b62b03
Mention getSnapshotBeforeUpdate should return. ( #930 )
If getSnapshotBeforeUpdate does not return a snapshot value or null
it will cause a warning. Document that it should return this value.
7 years ago
Dan Abramov
81dc09ede1
Make the reference doc tighter
Now that there are some cross referenced links we can tighten it up.
7 years ago
Dan Abramov
c70187cdbf
Cross-link more articles
7 years ago
Dan Abramov
a788a28708
Avoid ambiguity between elements and components
7 years ago
Dan Abramov
3346d710b9
Clarify we are talking about sync calls
7 years ago
Dan Abramov
640ac1397b
No "just"
7 years ago
Dan Abramov
f285d002c5
Reduce visual noise in the list
It's obvious enough that this is the same method. I don't think repeating its name in the list brings any value, and it puts too much visual emphasis on something we're trying to deemphasize.
7 years ago
Dan Abramov
4f01e35b9d
Rewrite some component doc parts
7 years ago
Dan Abramov
6fe2302aed
Don’t make experienced users feel bad
7 years ago
Dan Abramov
7603eb964b
Mark common lifecycles as bold ( #948 )
7 years ago
Dan Abramov
79411aa85b
Reorder and rewrite some parts of lifecycle reference ( #947 )
* Reorder and rewrite some parts of lifecycle reference
* Link to the lifecycle diagram
* More recommendations
7 years ago
Sébastien Boulet
95112711bb
fix link to anchor #unsafe_componentwillupdate ( #920 )
7 years ago
Brian Vaughn
3e80980c18
Renamed params for gDSFP
7 years ago
Andrew Clark
983476e3f3
Update getDerivedStateFromProps docs
7 years ago
barnonahill
9b72ba6f05
Add a sentence to the end of componentWillUnmount() ( #894 )
Adds a sentence explaining not to use setState in componentWillUnmount, see https://github.com/facebook/react/issues/12111
7 years ago
Dan Abramov
e3cf355618
Tweak componentWillReceiveProps docs ( #856 )
* Tweak componentWillReceiveProps docs
* Update reference-react-component.md
7 years ago
Dan Abramov
cf7329d6bd
Tweak wording
7 years ago
chucksellick
dbe5b49bbf
Fix a very small typo ( #754 )
"potential" -> "potentially"
7 years ago
chucksellick
abd3af9a3d
Recommend getDerivedStateFromProps ( #747 )
Fix a couple of paragraphs that recommended UNSAFE_componentWillReceiveProps
where it would now be more correct to recommend getDerivedStateFromProps.
7 years ago
Shovon Hasan
62638c8b2d
Fix broken link in UNSFE_componentWillReceiveProps docs. ( #744 )
7 years ago
Brian Vaughn
7ac0712ed8
Updated 16.3 blog post to account for getSnapshotBeforeUpdate lifecycle
7 years ago
Brian Vaughn
29d6592630
Update React.Component reference to show deprecations and new lifecycles
7 years ago
G Akshay
c66011b32d
`just before` sounds better that 'immediately before' ( #611 )
7 years ago
G Akshay
10c3a91538
Update reference-react-component.md ( #609 )
`just before` sounds better than `immediately before`.
7 years ago
Henrique Sosa
72e8051fa3
Fix misspelling
7 years ago
Dan Abramov
9a953858d6
Add more references to setState batching ( #583 )
7 years ago
Andrey Nikonov
ecf038e520
Update reference-react-component.md
There is no #createclass anchor on /docs/react-api.html page anymore.
7 years ago
Ernesto García
9b20285d1d
Update fragments example to use JSX syntax ( #520 )
* Update fragments example to use JSX syntax
* Use more standard JSX notation for fragments
* Bring back arrays-based example
* Remove keys in fragment, not needed for static items
* Add note about fragments syntax existing since v16.2
7 years ago
Dan Abramov
d5af622629
Mention that we don't recommend inheritance in the component doc ( #487 )
7 years ago
Dan Abramov
74de9934be
Avoid "tick" jargon in componentDidMount docs ( #415 )
7 years ago
Thomas Levy
1303a3d38c
Fix setState example code
Seems to have been a mix of the two examples the section was covering.
7 years ago
Dimitar Nestorov
0560d6be8b
Switching to a more popular representation of optional arguments
7 years ago
Dan Abramov
24cf4575ed
Tweak Lifecycle Docs ( #199 )
* Tweak Lifecycle Docs
* Nits
7 years ago
Brian Vaughn
07b015b687
Wording nit
7 years ago
Brian Vaughn
b785e8f7a5
Changed "and" to "or"
7 years ago
thomasyimgit
98386b633a
add componentDidCatch document and link
7 years ago
hozefaj
43c1c00703
fix links to pure component within docs
7 years ago
Brian Vaughn
d5ebad1d2a
Wordsmithing nit
7 years ago
Andy Edwards
e97ad4f5d4
Caution (in docs) against dispatching redux actions or triggering component updates by any other means in `componentWillUpdate`
7 years ago
Carlos Cuesta
1442bf4944
Document deepEquality checks & JSON.stringify in scu are a bad idea
7 years ago
Brian Vaughn
93aa551f1a
Reorganized 'docs' folder
7 years ago
Brian Vaughn
52b694eaae
Add new docs website ( #10896 )
Adds a new docs website, built with Gatsby JS, to replace the old Jekyll site. Source code for the new site lives in /www (although markdown and YML data still comes from the legacy /docs folder).
Changes to either markdown or website source code can be previewed on Netlify. The react-js bot should automatically add comments to each PR with preview links. (This preview is generated by running the newly-added yarn build:docs command in the root package.json.)
The majority of the changes in this PR are contained within the new /www directory. However some minor modifications have been made to existing content in the /docs directory:
* Modified frontmatter author block to always be an array
* Small markdown formatting tweaks
7 years ago
Ivan Babak
7f2cd20190
Fix fragments docs example JSX typo ( #10885 )
Fixes https://github.com/facebook/react/issues/10883
7 years ago
Andrew Clark
0e43ef2682
Doc updates for React 16 + blog post ( #10824 )
* Doc updates for React 16 + blog post
* Add link to Sophie's post
7 years ago
Héliton Nordt
2fc474ef46
Improve displayName documentation ( #10451 )
* Improve displayName documentation
* displayName docs: higher-order component lowercased to stay consistent with the rest of the docs
* Rephrase displayName reference docs
7 years ago
Kurt Furbush
1f01267f26
Update reference-react-component.md ( #9863 )
Grammatical edit to match same statement in state-and-lifecycle.html
8 years ago
Marcos Ojeda
6492b07cc3
docs better indicate that state updaters shallowly merge with state ( #9554 )
this was a surprise to me because the docs seemed to indicate that when
using an updater, the result _needed_ to be a new state object. I was
[not alone](https://twitter.com/ken_wheeler/status/857939690191806464 )
i think in discovering this as a result of the previous tweet in the
thread.
8 years ago