* Clarify preferred "props default to true" expr
The current text is ambiguous without reading further into the paragraph -- until I re-read this text, I was trying to avoid both types of syntax because it seemed to imply that it wans't recommended (eg "props default to true" --> "we don't recommend using this").
* Update jsx-in-depth.md
Co-authored-by: Sunil Pai <threepointone@oculus.com>
The ternary syntax using parenthesis was an unconventional prettier invention, going out of its way to format react ternaries differently from normal ternaries (if i remember correctly, because vim users had trouble re-formating without a mouse). If they made the right decision or not is one thing, but the additional noise could mislead beginners here, thinking they have to add more characters to make a simple 2-slot ternary, or that it is a "react thing".
Since persist() is referred to in the doc as a method for disabling event pooling, that must mean it's part of the SyntheticEvent API.
I'm proposing to state it more explicitly so that there's no doubt for newcomers like me whether it is the SyntheticEvent or the actual JS event that has the method.
Changed Line 94- You can't use Hooks *inside* of a class component, but you can definitely mix classes and function components with Hooks in a single tree.
to
"You can't use Hooks *inside* a class component, but you can definitely mix classes and function components with Hooks in a single tree. "
* Documentation error
Line 290 - ". However, instead we recommend to split state into multiple state variables based on which values tend to change together."
Both 'however' and 'instead' are contrasting words and only one of them should be used.
Either "Instead we recommend to split state into multiple state variables based on which values tend to change together." OR "However, we recommend to split state into multiple state variables based on which values tend to change together."
Updated the sentence.
* Updated 'however' to 'instead'
Line 290 updated to -
Instead, **we recommend to split state into multiple state variables based on which values tend to change together.**
* Update hooks-faq.md
Co-authored-by: Sunil Pai <threepointone@fb.com>
There's a line in the document that says:
"When it previously rendered, the `Calculator` has specified that"
The sentence is using a present tense verb ("has"), but the statement is in the past tense.
I think "When it previously rendered, the `Calculator` had specified that" would be correct.
* Update README.md (improve usability)
Clear up the ambiguous "Running locally" to the anchor link for better usability
* Update README.md
Co-authored-by: Sunil Pai <threepointone@oculus.com>