Skip to content

Терминология: группировка, обновление, группа обновлений #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2019

Conversation

gaearon
Copy link
Member

@gaearon gaearon commented Feb 10, 2019

No description provided.

@@ -55,6 +55,8 @@
| array | массив |
| arrow function | стрелочная функция |
| attribute | атрибут |
| batch | группа обновлений |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Глупый вопрос, но batch вроде необязательно касается всегда обновлений?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хм. Смотря что мы считаем обновлениями. В контексте реакта обычно имеются в виду вызовы setState.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

думаю что это достаточно точно, например в сырцах это зовется batchedUpdates

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We collect DOM operations on children in a list so we can execute them in batch:

https://reactjs.org/docs/implementation-notes.html#what-we-left-out

Copy link
Member Author

@gaearon gaearon Feb 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну это в принципе тоже про обновления. (Изменения в DOM триггерятся обновлением состояния)

Конечно первый маунт можно отдельно считать, но это мне кажется слишком формально.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Понял, хорошо.

@gaearon gaearon merged commit ecef307 into master Feb 10, 2019
@gaearon gaearon deleted the gaearon-patch-3 branch February 10, 2019 01:16
@another-guy another-guy added the translation-agreements Propose new agreement or change to an existing one label Feb 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
translation-agreements Propose new agreement or change to an existing one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants