reactjs / reactjs/react.dev

[Suggestion]: The process of commit phase is not clear.

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

还没有人认领这个 Issue。

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

描述

Summary

A more detailed explanation between the process of commit phase and Browser paint. And

Page

https://react.dev/learn/render-and-commit#step-3-react-commits-changes-to-the-dom

Details

At the end of this section, it summrize that Any screen update in a React app happens in three steps:Trigger, Render and Commit, but this section is actually divided into four subsections

  1. Step 1: Trigger a render
  2. Step 2: React renders your components
  3. Step 3: React commits changes to the DOM
  4. Epilogue: Browser paint

I can't figure out if the process of commit phases include Browser paint. In the Synchronizing with Effects section, it mentions that Effect will run after every commit. I think including browser paint into the process of commit phase is expected, and it would make sense to cut down this section into just three subsections, including browser paint into submit subsection.

Also in the Synchronizing with Effects section, there are two sentences like so:

Effects run at the end of a commit after the screen updates.
By default, your Effect will run after every commit.

I am not a English navitive speaker, and I think at the end of and after have different meaning, at the end of show something happens in the process of commit , while after doesn't. It would make sense to change at the end of to another phrase.

贡献指南

打开贡献指南

从这里开始

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

调研方向

从“Render and commit”页面开始,重点查看第 3 步和“Browser paint”结语,然后将其中的术语与“Synchronizing with Effects”进行比较。当文档明确区分 commit 和 browser paint,并解决“at the end of”与“after”之间表述不一致的问题时,即可视为完成。

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

评估

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

把新 issue 发到你的邮箱

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