Kunal Tiwari
e50e5634cc
Added undefined to in the list of possible return types of render function ( #5275 )
Co-authored-by: Shanmughapriyan S <priyanshan03@gmail.com>
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
2 years ago
Luciano Ayres
d223fbd476
Rephrase sentence ( #4880 )
Rephrase sentence referring to the single legacy method of 'UNSAFE_comonentWillMount()' on the Notes section within the 'Mounting' topic.
2 years ago
Kim Brandwijk
4bfd89654f
docs: fix optional argument representation ( #4732 )
3 years ago
dan
d14cbdca24
Add more details on batching ( #4559 )
* Add more details on batching
* Use a generic example
3 years ago
danield770
8251eabd38
`lifecycle` -> `lifecycle method` ( #3650 )
4 years ago
Yuqing Chen
b2363564ab
fix: typo ( #3388 )
4 years ago
Federico Zivolo
eafba20b3d
docs: document prod vs dev behavior difference in componentDidCatch ( #2168 )
4 years ago
Wojciech Maj
79bdfa0504
Change links to React lifecycle methods diagram to use HTTPS ( #2973 )
4 years ago
李鸿章
b24cabac64
Code the `null` and `undefined` values ( #3203 )
4 years ago
corinty
bc060f5edd
Moved a bracket in the setState function example ( #2164 )
5 years ago
Nat Alison
25df15b83e
reapply, correctly generating links
6 years ago
Nat Alison
dc1e5366e3
revert id adding
6 years ago
Nat Alison
3e49e971d0
add everything else again
6 years ago
Brian Vaughn
9e8bfd6de6
Moved UNSAFE_ renaming notes higher up to be more easily noticed
6 years ago
Brian Vaughn
cfc6d90d28
Changed wording about UNSAFE_componentWillReceiveProps deprecation
6 years ago
Dillon Mulroy
c30ab0e369
Fix anchor link for getDerivedStateFromError ( #1362 )
The anchor for `getDerivedStateFromError` was previously `#getderivedstatefromerror` when it should be `#static-getderivedstatefromerror`
6 years ago
Brian Vaughn
43339e2611
Add docs for getDerivedStateFromError [16.6] ( #1223 )
* Updated error boundary docs to reference new getDerivedStateFromError
* Updated some wording in response to PR feedback
* These
6 years ago
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