reactjs / reactjs/react.dev

Intro to react for BEGINNERS revision

Open
#1,015 0 comments 2 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

An exchange of tweets with super friendly @gaearon lead me to convert one of my replies into this ticket. To improve what is on the overview section for beginners here: https://reactjs.org/tutorial/tutorial.html

screen shot 2018-06-28 at 01 58 36

I suggest the "Overview" section is dedicated to the following and flows like this:

  • Explain what a component is (type, class) and that ES6 syntax which for someone with little JS experience looks like a normal JS syntax but it is not. With that hint outline what each term mean.

screen shot 2018-06-28 at 02 11 43

  • Explain a component's lifecycle briefly before touching on render and constructor methods. I think React lifecycle is inspired/affected by iOS/Android lifecycles so why not touch on those, for people like me who came from mobile world. Learning by association is one of the learning methods (I think).

  • Now feel free to explain what render is and why it must return something (including null).

  • Now is time to show Hello World not a shopping list:

class HelloWorld extends React.Component {
  render() { //compulsory React method/fucntion
    return (
      <p className="cssclass"> // a <p> element is also a component, className is a property
         Hello World!
      </p>
    );
  }
} 
  • (Optional) link to Thinking in React early on and that coloured component hierarchy of the stock list.

screen shot 2018-06-28 at 02 11 43

Its not easy to think like a beginner once you are a pro. Hope this is an improvement suggestion and not a cause for confusion.

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 Overview section of the linked React tutorial and compare it with the proposed beginner flow. Done means the overview explains components, lifecycle, and render in that order, uses the suggested Hello World example, and optionally links to Thinking in React.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.