Skip to content

Commit 966a00c

Browse files
authored
Update reactivity-fundamentals.md (#2442)
1 parent 4ba12e4 commit 966a00c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/guide/essentials/reactivity-fundamentals.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ If you are not using SFC, you can still use Composition API with the [`setup()`]
194194

195195
You might be wondering why we need refs with the `.value` instead of plain variables. To explain that, we will need to briefly discuss how Vue's reactivity system works.
196196

197-
When you use a ref in the template, and changes the ref's value later, Vue automatically detects the change and updates the DOM accordingly. This is made possible with a dependency-tracking based reactivity system. When a component is rendered for the first time, Vue **tracks** every ref that was used during the render. Later on, when a ref is mutated, it will **trigger** re-render for components that are tracking it.
197+
When you use a ref in a template, and change the ref's value later, Vue automatically detects the change and updates the DOM accordingly. This is made possible with a dependency-tracking based reactivity system. When a component is rendered for the first time, Vue **tracks** every ref that was used during the render. Later on, when a ref is mutated, it will **trigger** a re-render for components that are tracking it.
198198

199-
In standard JavaScript, there is no way to detect the access or mutation of plain variables. But we can intercept a property's get and set operations.
199+
In standard JavaScript, there is no way to detect the access or mutation of plain variables. However, we can intercept the get and set operations of an object's properties using getter and setter methods.
200200

201201
The `.value` property gives Vue the opportunity to detect when a ref has been accessed or mutated. Under the hood, Vue performs the tracking in its getter, and performs triggering in its setter. Conceptually, you can think of a ref as an object that looks like this:
202202

0 commit comments

Comments
 (0)