Skip to content

Commit 20afd40

Browse files
committed
chore: changelog edits [ci skip]
1 parent 9ab22c7 commit 20afd40

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

CHANGELOG.md

+18-3
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,31 @@
3030

3131
### BREAKING CHANGES
3232

33-
* **runtime-core:** replae `watch(fn, options?)` with `watchEffect`
33+
* **runtime-core:** replace `watch(fn, options?)` with `watchEffect`
3434

3535
The `watch(fn, options?)` signature has been replaced by the new
3636
`watchEffect` API, which has the same usage and behavior. `watch`
37-
now only supports the `watch(source, cb, options?)` signautre.
38-
* reactive arrays no longer unwraps contained refs
37+
now only supports the `watch(source, cb, options?)` signature.
38+
39+
* **reactivity:** reactive arrays no longer unwraps contained refs
3940

4041
When reactive arrays contain refs, especially a mix of refs and
4142
plain values, Array prototype methods will fail to function
4243
properly - e.g. sort() or reverse() will overwrite the ref's value
44+
instead of moving it (see #737).
45+
46+
Ensuring correct behavior for all possible Array methods while
47+
retaining the ref unwrapping behavior is exceedinly complicated; In
48+
addition, even if Vue handles the built-in methods internally, it
49+
would still break when the user attempts to use a 3rd party utility
50+
functioon (e.g. lodash) on a reactive array containing refs.
51+
52+
After this commit, similar to other collection types like Map and
53+
Set, Arrays will no longer automatically unwrap contained refs.
54+
55+
The usage of mixed refs and plain values in Arrays should be rare in
56+
practice. In cases where this is necessary, the user can create a
57+
computed property that performs the unwrapping.
4358

4459

4560

0 commit comments

Comments
 (0)