reactjs / reactjs/react.dev

Variable naming inconsistency in the tutorial documentation

Open Beginner friendly
#4,823 0 comments 0 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 have just used the React tutorial, it is great!
It helps a lot to learn the basic.

While working, I have spotted a small inconsistency on https://github.com/reactjs/reactjs.org/blob/main/content/tutorial/tutorial.md

When creating the buttons to move into the history, we are using a move variable that we are sending to jumpTo:

image

But jumpTo use step to make the moves:

image

I suggest that we switch the move and step variables of the render function to make the tutorial more understandable by beginners:

image

I can push a merge request for the documentation but I do not know how to change the source code linked by @gaearon on codepen:
https://codepen.io/gaearon/pen/gWWZgR?editors=0010

Is there a way to do that?

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 content/tutorial/tutorial.md and read the tutorial's render function alongside jumpTo to confirm the variable naming inconsistency. Check the linked CodePen to determine whether it is also part of the requested documentation change. Done means the tutorial uses consistent names and the relevant example remains understandable to beginners.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.