As a general rule, `onClick` handlers should not be applied to non-interactive elements like a `div`. There is not substantive change to the code sample, but it doesn't provide a better example of semantic HTML for developers reading the documentation.
A page could have 50 links, every one with the link text "Here" and it doesn't mean anything.
Search engines rely on the fact that the link text says something about the link. The text "Here" doesn't mean anything to search engines. Using "Here" as link text has no semantic value.
On line 40, the phrase following the 'comma and' should be independent (i.e., contain a subject). Alternatively, the comma preceding the 'and' should be deleted, making the dependent clause following the 'and' grammatically acceptable.
* Updated strict-mode docs to use UNSAFE_ method names
The strict mode docs still reference the old `componentWill*` lifecycle method names, this updates them to be `UNSAFE_componentWill*`
* Tweaked docs to mention both unsafe lifecycle names
Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com>
I believe the text in this paragraph is meant to say `visibly` but that alone is not expressive enough so `very` was added in front. I believe the correct unambiguous word to use here should be `noticeably`.
cc @gaearon
* Update "Refs and the DOM" documentation
As function components can now have state through hooks, remove the part that mentions converting a function component to a class component to be able to use state.
* Update refs-and-the-dom.md
Co-authored-by: Sophie Alpert <git@sophiebits.com>
* Memo: Document behavior with useContext
It is not obvious that useContext and Memo work well together. Namely, if a child component listens to a context and updates out from under them memo'd function, does the memo'd component have the right state if re-rendered?
yes, actually. but this is undocumented. Now it's not!
* fix typo tigger -> trigger
* Add more detail to all relevant pages
Co-authored-by: Alex Krolick <alexkrolick@users.noreply.github.com>
Co-authored-by: Sophie Alpert <git@sophiebits.com>