From bd7187e33b3573edfd4533ae1ea1ee8eaab91540 Mon Sep 17 00:00:00 2001 From: Zeddrix Fabian <37854513+zeddrix@users.noreply.github.com> Date: Fri, 24 Sep 2021 07:28:57 +0800 Subject: [PATCH] Corrected grammar. Just removed the word 'it' because of it's unnecessary use. --- site/content/tutorial/07-lifecycle/04-tick/text.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/content/tutorial/07-lifecycle/04-tick/text.md b/site/content/tutorial/07-lifecycle/04-tick/text.md index 8f5603a361..c1a327bec8 100644 --- a/site/content/tutorial/07-lifecycle/04-tick/text.md +++ b/site/content/tutorial/07-lifecycle/04-tick/text.md @@ -2,7 +2,7 @@ title: tick --- -The `tick` function is unlike other lifecycle functions in that you can call it any time, not just when the component first initialises. It returns a promise that resolves as soon as any pending state changes have been applied to the DOM (or immediately, if there are no pending state changes). +The `tick` function is unlike other lifecycle functions in that you can call any time, not just when the component first initialises. It returns a promise that resolves as soon as any pending state changes have been applied to the DOM (or immediately, if there are no pending state changes). When you update component state in Svelte, it doesn't update the DOM immediately. Instead, it waits until the next *microtask* to see if there are any other changes that need to be applied, including in other components. Doing so avoids unnecessary work and allows the browser to batch things more effectively. @@ -18,4 +18,4 @@ import { tick } from 'svelte'; await tick(); this.selectionStart = selectionStart; this.selectionEnd = selectionEnd; -``` \ No newline at end of file +```