Tycho
d3f5e6e531
fix(reactivity): prevent overwriting `next` property during batch processing ( #12075 )
...
close #12072
2024-10-03 23:16:52 +08:00
Evan You
aa9ef2386a
fix(reactivity): only clear notified flags for computed in first batch iteration
...
close #12045
2024-09-27 11:25:58 +08:00
Evan You
c74bb8c2dd
fix(reactivity): avoid exponential perf cost and reduce call stack depth for deeply chained computeds ( #11944 )
...
close #11928
2024-09-16 16:00:31 +08:00
Evan You
11eebcb4df
refactor(reactivity): use class for Link
2024-09-13 18:35:16 +08:00
Evan You
e596378e0b
fix: Revert "fix: Revert "fix(reactivity): self-referencing computed should refresh""
...
This reverts commit 35c760f82f
.
2024-09-10 16:01:20 +08:00
Evan You
35c760f82f
fix: Revert "fix(reactivity): self-referencing computed should refresh"
...
This reverts commit e84c4a608e
.
2024-09-06 08:47:12 +08:00
Evan You
e84c4a608e
fix(reactivity): self-referencing computed should refresh
...
ref: https://github.com/vuejs/core/pull/11797#issuecomment-2330738633
2024-09-05 19:04:17 +08:00
Tycho
5cf5a1620d
fix(types/computed): ensure type safety for `WritableComputedRef` ( #11608 )
2024-08-14 15:11:10 +08:00
Kevin Deng 三咲智子
928af5fe2f
refactor(types): enable `isolatedDeclarations` ( #11178 )
2024-08-08 23:05:21 +08:00
远方os
a01675ef8f
feat(types): allow computed getter and setter types to be unrelated ( #11472 )
...
close #7271
2024-08-05 10:51:56 +08:00
Evan You
1224caf1ba
chore: format
2024-06-14 12:38:07 +02:00
Wick
f8eba75d0a
chore(reactivity): change literal flag properties to enum flag properties ( #10367 )
2024-05-30 19:09:04 +08:00
Evan You
72bde94e66
types: fix ComputedRefImpl type build
2024-02-26 17:46:28 +08:00
Evan You
5d303660b1
chore(types): fix ComputedRefImpl type build
2024-02-26 10:25:44 +08:00
Evan You
58d827cb71
chore: Merge branch 'main' into minor
2024-02-26 10:13:44 +08:00
Evan You
b31dd7468b
dx(reactivity): disable recursive computed warning by default
...
Now can be enabled with app.config.warnRecursiveComputed option.
close #10341
2024-02-25 20:38:33 +08:00
Doctor Wu
21e0d6b145
dx(reactivity): add getter into computed side effect warning ( #10386 )
2024-02-25 20:27:33 +08:00
Evan You
05eb4e0fef
Refactor reactivity system to use version counting and doubly-linked list tracking ( #10397 )
...
Bug fixes
close #10236
close #10069
PRs made stale by this one
close #10290
close #10354
close #10189
close #9480
2024-02-25 16:51:49 +08:00
Doctor Wu
f7ba97f975
feat(dx): warn users when computed is self-triggering ( #10299 )
2024-02-13 17:38:26 +08:00
Johnson Chu
0bced13ee5
fix(reactivity): avoid infinite recursion from side effects in computed getter ( #10232 )
...
close #10214
2024-02-06 18:44:09 +08:00
Johnson Chu
6c7e0bd88f
fix(reactivity): handle `MaybeDirty` recurse ( #10187 )
...
close #10185
2024-02-06 18:23:56 +08:00
Johnson Chu
c2b274a887
fix(reactivity): re-fix #10114 ( #10123 )
2024-01-18 10:46:57 +08:00
Johnson Chu
e45a8d24b4
fix(reactivity): fix dirtyLevel checks for recursive effects ( #10101 )
...
close #10082
2024-01-13 15:53:06 +08:00
三咲智子 Kevin Deng
bfe6b459d3
style: update format & lint config ( #9162 )
...
Co-authored-by: 丶远方 <yangpanteng@gmail.com>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
Co-authored-by: Guo Xingjun <99574369+Plumbiu@users.noreply.github.com>
2023-12-26 19:39:47 +08:00
Johnson Chu
48b47a1ab6
feat(reactivity): expose last result for computed getter ( #9497 )
2023-10-31 22:19:40 +08:00
Johnson Chu
16e06ca08f
feat(reactivity): more efficient reactivity system ( #5912 )
...
fix #311 , fix #1811 , fix #6018 , fix #7160 , fix #8714 , fix #9149 , fix #9419 , fix #9464
2023-10-27 23:28:40 +09:00
Roland Hummel
c346af2b6a
docs: comments on reactivity functions ( fixes #4832 ) ( #4836 )
...
close #4832
2023-03-31 17:06:10 +08:00
Carlos Rodrigues
17c50ce18d
build(deps-dev): bump typescript to 4.7.4 ( #6215 )
2022-07-06 04:27:30 -04:00
Evan You
2f91872e7b
fix(ssr): only cache computed getters during render phase
...
fix #5300
2022-01-21 12:31:54 +08:00
Evan You
f4f0966b33
fix(ssr): make computed inactive during ssr, fix memory leak
...
fix #5208
2022-01-16 18:22:18 +08:00
Marvin Rudolph
d56f115f71
chore(reactivity): fix typo in types ( #4889 )
2021-11-02 20:19:39 +01:00
zhangenming
b264551c9b
refactor(reactivity): reuse computed getter check ( #4623 )
2021-09-21 13:03:09 -04:00
Evan You
815bfcffae
fix(types): fix ref macro types
...
fix #4499
2021-09-04 16:42:46 -04:00
Amour1688
d3d5ad204d
fix(types): remove explicit return type annotation requirement for `this` inference in computed options ( #4221 )
2021-08-02 09:18:35 -04:00
Evan You
33c2fbfdc8
fix(reactivity): revert computed scheduler change
...
fix #4157
2021-07-20 16:45:29 -04:00
Evan You
47f488350c
chore: run updated prettier
2021-07-19 18:24:18 -04:00
Evan You
6eb47f000a
fix(reactivity): computed should not trigger scheduler if stopped
...
fix #4149
2021-07-19 13:37:03 -04:00
Evan You
5cea9a1d4e
feat(reactivity): support onTrack/onTrigger debug options for computed
2021-07-16 14:30:49 -04:00
Evan You
2dd4739089
test: more test cases for computed w/ scheduler
2021-07-16 14:30:49 -04:00
Evan You
1fe2239270
refactor: sync value access for chained computed w/ scheduler
2021-07-16 14:30:49 -04:00
Evan You
979a841946
chore: use consistent file naming
2021-07-16 14:30:49 -04:00
Bas van Meurs
6cf2377cd4
perf(reactivity): use bitwise dep markers to optimize re-tracking ( #4017 )
2021-07-16 14:30:49 -04:00
Evan You
cc09772d55
chore: remove unncessary property on ComputedRef interface
2021-07-16 14:30:49 -04:00
Evan You
ebaac9a56d
perf(reactivity): avoid triggering re-render if computed value did not change
2021-07-16 14:30:49 -04:00
Evan You
87f69fd0bb
perf(reactivity): improve reactive effect memory usage ( #4001 )
...
Based on #2345 , but with smaller API change
- Use class implementation for `ReactiveEffect`
- Switch internal creation of effects to use the class constructor
- Avoid options object allocation
- Avoid creating bound effect runner function (used in schedulers) when not necessary.
- Consumes ~17% less memory compared to last commit
- Introduces a very minor breaking change: the `scheduler` option passed to `effect` no longer receives the runner function.
2021-07-16 14:30:49 -04:00
Bas van Meurs
64310405ac
perf(reactivity): ref-specific track/trigger and miscellaneous optimizations ( #3995 )
2021-07-16 14:30:49 -04:00
Evan You
41e02f0fac
fix(reactivity): ensure computed can be wrapped by readonly
...
fix #3376
2021-03-25 11:23:34 -04:00
Robbin Baauw
07919e0065
perf(reactivity): improve ref performance by using class-based implementation ( #1900 )
2020-08-21 13:47:41 -04:00
Carlos Rodrigues
dabdc5e115
feat(computed): add readonly flag if no setter is provided ( #1654 )
2020-07-20 17:35:31 -04:00
Pick
4f6460a71f
chore(reactivity): remove unused comment ( #1485 ) [ci skip]
2020-07-06 15:57:54 -04:00