reactjs / reactjs/react.dev

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

Ouverte
#7,429 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

type: documentation
Langage dominant
JavaScript
Étoiles
11.8k
Forks
7.9k
Merge moyen
1 j 11 h
PR mergées (30 j)
11

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par la page « Render and commit », en particulier l’étape 3 et l’épilogue « Browser paint », puis comparez sa terminologie avec « Synchronizing with Effects ». C’est terminé lorsque la documentation distingue clairement commit de browser paint et résout l’emploi incohérent de « at the end of » et de « after ».

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, react
Domaine
documentation
Type d'issue
Documentation
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.