reactjs / reactjs/react.dev

Add proper error description in tutorial

未关闭
#1,867 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
JavaScript
星标
11.8k
派生
7.9k
平均合并
1 天 11 小时
30 天内合并 PR
11

描述

URL: https://reactjs.org/tutorial/tutorial.html

In the Lifting State Up we reach a point where we have passed the onClick handler of square from board and we are about to define the handleClick() function and the guide states that for now we will get an error as this.handleClick is not a function
whereas I receive a slightly different error. (enclosed in screenshots)

It would benefit the tutorial to add a screenshot so that the user running through the tutorial is getting the correct type of error.
this might seem excessive but when a person is following a guide step by step even a mention of receiving a planned error seems like a step in the learning and hence we should ensure the user gets a better look at it.
I am just putting this here as maybe a discussion point or if any mod could provide some insight

Screenshot 2019-03-26 at 11 44 58 AM Screenshot 2019-03-26 at 11 45 12 AM

(doesn't seem like a major fix and would love to send a PR for this as well, if we decide to implement this)

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

查看链接的教程 URL 中 React 教程的“Lifting State Up”部分,并将文档中记录的 this.handleClick 错误与 issue 中的截图进行比较。更新说明或添加所请求的截图,使预期错误与用户遇到的错误一致;验证教程从前一步开始仍然能够正确阅读。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, react
领域
documentation
Issue 类型
文档
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。