Skip to content

Explain that the useState setter triggers a re-render in Quick Start - #8667

Open
Dextheking1 wants to merge 1 commit into
reactjs:mainfrom
Dextheking1:docs/quick-start-rerender-sentence
Open

Dextheking1 wants to merge 1 commit into
reactjs:mainfrom
Dextheking1:docs/quick-start-rerender-sentence

Conversation

@Dextheking1

Copy link
Copy Markdown

Closes #8655.

The Quick Start guide introduces useState but never names the re-render: it says "React will call your component function again" without connecting that back to calling the setter, which the issue notes is a common point of confusion for beginners coming from plain JavaScript.

One-sentence change in the "Updating the screen" section: "Calling setCount triggers a re-render: React will call your component function again." This keeps the existing explanation intact while making the setter -> re-render causation explicit.

@github-actions

Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: improve useState explanation in quick start

1 participant