From 30802857ef562277a747e030b6f63e03548ad93d Mon Sep 17 00:00:00 2001 From: Mark A Shuttleworth <144485+MShuttle@users.noreply.github.com> Date: Sat, 27 Mar 2021 17:38:28 +1100 Subject: [PATCH] Update text.md There may be misstatement with respect to the tense of the first clause, 'is' vs 'has been'. --- site/content/tutorial/07-lifecycle/03-update/text.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/content/tutorial/07-lifecycle/03-update/text.md b/site/content/tutorial/07-lifecycle/03-update/text.md index 40e071630a..0255e845a8 100644 --- a/site/content/tutorial/07-lifecycle/03-update/text.md +++ b/site/content/tutorial/07-lifecycle/03-update/text.md @@ -2,7 +2,7 @@ title: beforeUpdate and afterUpdate --- -The `beforeUpdate` function schedules work to happen immediately before the DOM has been updated. `afterUpdate` is its counterpart, used for running code once the DOM is in sync with your data. +The `beforeUpdate` function schedules work to happen immediately before the DOM is updated. `afterUpdate` is its counterpart, used for running code once the DOM is in sync with your data. Together, they're useful for doing things imperatively that are difficult to achieve in a purely state-driven way, like updating the scroll position of an element. @@ -21,4 +21,4 @@ afterUpdate(() => { }); ``` -Note that `beforeUpdate` will first run before the component has mounted, so we need to check for the existence of `div` before reading its properties. \ No newline at end of file +Note that `beforeUpdate` will first run before the component has mounted, so we need to check for the existence of `div` before reading its properties.