teleskop150750
d089f23943
feat: untrack
2025-05-06 13:31:01 +03:00
远方os
267093c314
feat(reactivity/watch): add pause/resume for ReactiveEffect, EffectScope, and WatchHandle ( #9651 )
2024-08-02 14:41:27 +08:00
Evan You
26356264d2
chore: Merge branch 'main' into minor
2024-06-14 12:32:28 +02:00
Tycho
d04417da41
test(effect): verify cleanupEffect clears multiple dependencies ( #9503 )
...
close #5541
2024-06-06 17:52:01 +08:00
chenfan
71c2c0af74
test(reactivity): should not observe well-known symbol keyed properties in has operation ( #9174 )
2024-06-06 17:41:15 +08:00
Wick
28841fee43
fix(reactivity): fix call sequence of ontrigger in effect ( #10501 )
2024-04-25 10:30:51 +08:00
Evan You
2cc5615590
feat(reactivity): `onEffectCleanup` API
...
ref #10173
Instead of exposing `getCurrentEffect`, this version accepts a second
argument to suppress the no-active-effect warning.
2024-03-05 22:53:20 +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
Johnson Chu
e45a8d24b4
fix(reactivity): fix dirtyLevel checks for recursive effects ( #10101 )
...
close #10082
2024-01-13 15:53:06 +08:00
Evan You
8b1848173b
revert: fix(reactivity): correct dirty assign in render function ( #10091 )
...
This reverts commit 8d04205041
.
close #10098
close #10100
2024-01-13 10:38:25 +08:00
Doctorwu
8d04205041
fix(reactivity): correct dirty assign in render function ( #10091 )
...
close #10082
2024-01-12 21:13:17 +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
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
skirtle
e9e2778e9e
fix(reactivity): assigning array.length while observing a symbol property ( #7568 )
2023-10-21 09:48:59 +08:00
chenfan
e33d554cae
refactor(reactivity): add instance check for effect ( #9055 )
2023-09-05 03:27:54 -05:00
丶远方
b01fc7ea84
chore: remove unnecessary imports ( #8262 )
2023-05-19 07:54:12 +08:00
Evan You
8867bb259a
wip(vitest-migration): reactivity tests passing
2023-01-26 15:25:55 +08:00
Evan You
588bd44f03
fix(reactivity): track hasOwnProperty
...
fix #2619
close #2621
2022-11-14 17:17:35 +08:00
bcq028
e6224f4256
fix(reactivity): enable trigger when use str to set length of arr ( #6810 )
...
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-10-21 09:25:06 +02:00
HeYunfei
b5b103a736
chore(types): delete @ts-ignore or use @ts-expected-error instead ( #3669 )
...
Co-authored-by: heyunfei.i <heyunfei.i@bytedance.com>
2022-05-11 20:40:59 -04:00
Evan You
154233abdb
fix(reactivity): fix ref tracking of self-stopping effects
...
close #5707
2022-04-13 17:00:31 +08:00
Pick
35cc7b0d31
chore(reactivity): correct the description of the test case ( #4135 )
2021-07-19 17:59:30 -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
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
HcySunYang
5036c51cb7
fix(reactivity): fix tracking for readonly + reactive Map ( #3604 )
...
fix #3602
2021-05-07 18:49:11 -04:00
liaoliao666
c61e767422
fix(reactivity): should not trigger when setting value to same proxy ( #2904 )
2021-03-29 17:52:57 -04:00
ᴜɴвʏтᴇ
f316a332b0
fix(reactivity): avoid length mutating array methods causing infinite updates ( #2138 )
...
fix #2137
Co-authored-by: Evan You <yyx990803@gmail.com>
2020-09-18 01:01:36 -04:00
Evan You
7454e2a52b
build(deps): upgrade to TypeScript 4
2020-08-20 17:48:28 -04:00
Evan You
730e39eb76
refactor: remove unnecessary conditions and test case
2020-07-28 12:26:14 -04:00
Evan You
7edfdf7e23
fix(reactivity): avoid tracking internal symbols in has trap
...
fix #1683
2020-07-22 21:23:32 -04:00
HiiTea
22717772dd
chore: fix typos ( #1090 )
2020-05-01 09:42:58 -04:00
Evan You
09b4202a22
refactor(reactivity): adjust APIs
...
BREAKING CHANGE: Reactivity APIs adjustments:
- `readonly` is now non-tracking if called on plain objects.
`lock` and `unlock` have been removed. A `readonly` proxy can no
longer be directly mutated. However, it can still wrap an already
reactive object and track changes to the source reactive object.
- `isReactive` now only returns true for proxies created by `reactive`,
or a `readonly` proxy that wraps a `reactive` proxy.
- A new utility `isProxy` is introduced, which returns true for both
reactive or readonly proxies.
- `markNonReactive` has been renamed to `markRaw`.
2020-04-15 16:45:20 -04:00
Evan You
0764c33d3d
fix(reactivity): scheduled effect should not execute if stopped
...
fix #910
2020-04-02 19:50:48 -04:00
guaijie
5fac65589b
fix(reactivity): should trigger all effects when array length is mutated ( #754 )
2020-02-21 11:38:07 +01:00
Evan You
e8e67729cb
fix(reactivity): effect should handle self dependency mutations
2020-02-18 13:22:09 -05:00
Evan You
89a187b895
refactor(reactivity): separate track and trigger operation types
2019-12-03 11:30:24 -05:00
JiZhi
cb97d152b8
test(effect): add test for nested stopped effect ( #417 )
2019-10-30 11:36:17 -04:00
Evan You
247c53672d
refactor(reactivity): simplify effect options
2019-10-30 11:11:23 -04:00
夜宴
57276f9dcb
test(effect): add test for json methods ( #371 )
2019-10-25 10:17:31 -04:00
Mayness
18a349ce8c
fix(reactivity): account for NaN in value change checks ( #361 )
2019-10-23 11:53:43 -04:00
Evan You
d69d3bf765
fix(reactivity): revert to Reflect.get and add test cases
2019-10-18 15:31:28 -04:00
唐道海
b7b89505eb
test(reactivity/effect): add test for lazy option ( #179 )
2019-10-10 10:12:27 -04:00
Carlos Rodrigues
600ec5de42
chore: improve typings in reactivity tests ( #96 )
2019-10-05 10:39:40 -04:00
Evan You
62e07a1b7e
test: coverage
2019-08-27 14:42:05 -04:00
Evan You
7ecdc79d5e
test: finish tests for watch api
2019-08-27 11:35:22 -04:00
Evan You
cb3866890f
test: effect.onStop
2019-08-26 21:24:44 -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