reactjs / reactjs/react.dev

Updating Examples To Function Components & Hooks

Open
#2,944 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
11.8k
Forks
7.9k
Avg merge
1d 11h
Merged PRs (30d)
11

Description

Hi, I am new to react and was just going through the documentation. When, I discovered that most of the examples in the react documentation are outdated, they still use class instead of a function component.

Few Examples Of This :
https://reactjs.org/docs/forms.html
https://reactjs.org/docs/lifting-state-up.html

Also, I believe showing the integration of hooks in these examples, will be of much great help to beginners.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the examples in docs/forms.html and docs/lifting-state-up.html, then compare them with the current documentation conventions for function components and hooks. Update the identified examples so they demonstrate function components and hooks, and verify that both pages no longer rely on class components.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.