Skip to content

Commit 381861a

Browse files
Add computed refs to isReadonly (vuejs#2054)
1 parent 71791c2 commit 381861a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/api/reactivity-utilities.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ Checks if an object is a proxy created by [`reactive()`](./reactivity-core.html#
183183

184184
## isReadonly()
185185

186-
Checks if an object is a proxy created by [`readonly()`](./reactivity-core.html#readonly) or [`shallowReadonly()`](./reactivity-advanced.html#shallowreadonly).
186+
Checks whether the passed value is a readonly object. The properties of a readonly object can change, but they can't be assigned directly via the passed object.
187+
188+
The proxies created by [`readonly()`](./reactivity-core.html#readonly) and [`shallowReadonly()`](./reactivity-advanced.html#shallowreadonly) are both considered readonly, as is a [`computed()`](./reactivity-core.html#computed) ref without a `set` function.
187189

188190
- **Type**
189191

0 commit comments

Comments
 (0)