Commit Graph

18 Commits

Author SHA1 Message Date
Evan You
82bdf86254 fix(reactivity): ensure computed is invalidated before other effects
fix #5720
2022-04-15 16:43:17 +08:00
Evan You
33c2fbfdc8 fix(reactivity): revert computed scheduler change
fix #4157
2021-07-20 16:45:29 -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
bde855e017 test: test for computed optimization 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
Evan You
03a7a73148 fix(reactivity): ensure computed always expose value
fix #3099

Also changes the original fix for #910 by moving the fix from
reactivity to the scheduler
2021-05-27 20:53:21 -04:00
Evan You
5c74243211 test: move mockWarn into setup files 2020-07-27 22:58:51 -04:00
Carlos Rodrigues
dabdc5e115
feat(computed): add readonly flag if no setter is provided (#1654) 2020-07-20 17:35:31 -04:00
Evan You
2569890e31 refactor: move mockWarn utility to @vue/shared
close #652
2020-01-22 09:29:45 -05:00
Dmitry Sharshakov
530be302fc feat(computed): warn if trying to set a readonly computed (#161) 2019-10-09 12:20:53 -04:00
Carlos Rodrigues
600ec5de42 chore: improve typings in reactivity tests (#96) 2019-10-05 10:39:40 -04:00
Evan You
0aff144f93 wip: improve computed typing + test for setters 2019-08-21 12:01:05 -04:00
Evan You
aacad85058 test: fix reactivity tests 2019-08-20 09:58:10 -04:00
Evan You
caba6d5c9e wip: state -> reactive, value -> ref 2019-08-16 09:42:46 -04:00
Evan You
471899af8b refactor: rename reactivity package name and APIs 2019-06-11 23:50:28 +08:00