btholt / btholt/complete-intro-to-react-v8

Probably incorrect/misleading paragraph in B-Hooks.md

Open
#23 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.8k
Forks
199
PR merge metrics
No merged PRs in 30d

Description

In B-Hooks.md there is a paragraph:

`Now navigate to [http://localhost:5173/](https://react-v8.holt.courses/lessons/core-react-concepts/hooks) and see that your have one input box that says "Seattle, WA". Try and type in it. You'll see that you can't modify it. Why? Let's think about how React works: when you type in the input, React detects that a DOM event happens. When that happens, React thinks something may have changed so it runs a re-render. Providing your render functions are fast, this is a very quick operation. It then diffs what's currently there and what its render pass came up with. It then updates the minimum amount of DOM necessary.`

and

`So if we type in our input and it re-renders, what gets out in the input tag? Well, its value is tied to location and nothing changed that, so it remains the same. In other words, two way data binding is not free in React. I say this is a feature because it makes you explicit on how you handle your data. Let's go make it work.`

But React doesn't run a rerender when state doesn't change. In this example it simply doesn't rerender.

Contributor guide

No contributing guide indexed for this repository

Research direction

Open B-Hooks.md and review the two quoted paragraphs against the reported React behavior. Correct the explanation so it does not claim a re-render occurs when state is unchanged, then check the surrounding lesson text for consistency.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation, frontend
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.