MDN React Tutorials #4: Hooks and state#30977
MDN React Tutorials #4: Hooks and state#30977chrisdavidmills merged 22 commits intomdn:mainfrom mxmason:ej/react-rewrite-4
Conversation
|
Preview URLs (comment last updated: 2023-12-21 11:27:18) |
mxmason
left a comment
There was a problem hiding this comment.
To you, @chrisdavidmills!
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Outdated
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Outdated
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Outdated
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Show resolved
Hide resolved
chrisdavidmills
left a comment
There was a problem hiding this comment.
Brilliant work, thank you @mxmason! I've got a few suggestions for you to look through, but nothing major.
I also made a couple of small changes along the way, just minor text tweaks.
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Outdated
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Outdated
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Outdated
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Outdated
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Outdated
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Outdated
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Outdated
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Back to you, @chrisdavidmills! This one got away from me a bit, but I think these changes are worthwhile.
Also, FYI: I've opened a PR against Mozilla's reference implementation of the todo list app: mdn/todo-react#97
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Outdated
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Show resolved
Hide resolved
...ools_and_testing/client-side_javascript_frameworks/react_interactivity_events_state/index.md
Show resolved
Hide resolved
chrisdavidmills
left a comment
There was a problem hiding this comment.
@mxmason OK, re-reviewed! Just another couple of small suggestions and sets of small text tweaks for you to review. Very nearly there now!
Co-authored-by: Chris Mills <[email protected]>
mxmason
left a comment
There was a problem hiding this comment.
Alright, @chrisdavidmills, I've made one more change. I'm good with this if you are!
| ``` | ||
|
|
||
| This `on*` naming convention appears in several React projects, so keep it in mind as you continue your learning. For the sake of clarity, we're going to stick with `addTask` and similar prop names for the rest of this tutorial. If you changed any prop names while reading this section, be sure to change them back before continuing! | ||
| This `on*` naming convention is very common in the React ecosystem, so keep it in mind as you continue your learning. For the sake of clarity, we're going to stick with `addTask` and similar prop names for the rest of this tutorial. If you changed any prop names while reading this section, be sure to change them back before continuing! |
There was a problem hiding this comment.
🔍 It is not an exaggeration to say that I have seen the on* callback pattern in every React project I've ever worked in, so "several" is not strong enough language. I've adjusted here and also deleted the mention of the broader ecosystem a couple paragraphs up (see 3acf664)
There was a problem hiding this comment.
OK, fair enough. I think your new language here is better. I think I was a bit worried about using language like "vast majority", as people might think "then why the heck did they not use it here?". But I'm happy with this update.
chrisdavidmills
left a comment
There was a problem hiding this comment.
@mxmason ding ding! Approved ;-)
* chore: clean up intro * chore: .js * chore: fix import statements * chore: small nit * chore: disambiguate "e" as "event" * chore: add "at this point" checks * chore: fix final app.jsx check * small tweak * Small tweak * Small tweak * chore: suggestions from code review Co-authored-by: Chris Mills <[email protected]> * chore: clarify form submission section * chore: add naming convention note * chore: rewrite state section * chore: nits * Small tweak * Small tweaks to new section * Small tweaks to updated state section * chore: apply suggestions from code review Co-authored-by: Chris Mills <[email protected]> * chore: clarify ecosystem statement --------- Co-authored-by: Chris Mills <[email protected]>
Description
Following #30515, as part of mdn/mdn#474, this PR makes some modifications to the fourth page in our "Getting started with React" tutorial.
Do not merge this until #30514 has been merged and you have updated this PR with mdn main and checked for breakages.