Skip to content

Commit

Permalink
other: #196 🔹 remove reactive effect deps (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
ubugeeei authored Dec 30, 2023
1 parent 6960a66 commit 873da6b
Show file tree
Hide file tree
Showing 57 changed files with 2 additions and 378 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const targetMap = new WeakMap<any, KeyToDepMap>();
export let activeEffect: ReactiveEffect | undefined;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(public fn: () => T) {}

run() {
Expand All @@ -31,7 +30,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export let activeEffect: ReactiveEffect | undefined;
export type EffectScheduler = (...args: any[]) => any;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(
public fn: () => T,
public scheduler: EffectScheduler | null = null
Expand Down Expand Up @@ -36,7 +35,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export let activeEffect: ReactiveEffect | undefined;
export type EffectScheduler = (...args: any[]) => any;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(
public fn: () => T,
public scheduler: EffectScheduler | null = null
Expand Down Expand Up @@ -36,7 +35,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export let activeEffect: ReactiveEffect | undefined;
export type EffectScheduler = (...args: any[]) => any;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(
public fn: () => T,
public scheduler: EffectScheduler | null = null
Expand Down Expand Up @@ -36,7 +35,6 @@ export function track(target: object, key: unknown) {

if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export let activeEffect: ReactiveEffect | undefined;
export type EffectScheduler = (...args: any[]) => any;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(
public fn: () => T,
public scheduler: EffectScheduler | null = null
Expand Down Expand Up @@ -41,7 +40,6 @@ export function track(target: object, key: unknown) {
export function trackEffects(dep: Dep) {
if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export let activeEffect: ReactiveEffect | undefined;
export type EffectScheduler = (...args: any[]) => any;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(
public fn: () => T,
public scheduler: EffectScheduler | null = null
Expand Down Expand Up @@ -41,7 +40,6 @@ export function track(target: object, key: unknown) {
export function trackEffects(dep: Dep) {
if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export let activeEffect: ReactiveEffect | undefined;
export type EffectScheduler = (...args: any[]) => any;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(
public fn: () => T,
public scheduler: EffectScheduler | null = null
Expand Down Expand Up @@ -41,7 +40,6 @@ export function track(target: object, key: unknown) {
export function trackEffects(dep: Dep) {
if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export let activeEffect: ReactiveEffect | undefined;
export type EffectScheduler = (...args: any[]) => any;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(
public fn: () => T,
public scheduler: EffectScheduler | null = null
Expand Down Expand Up @@ -41,7 +40,6 @@ export function track(target: object, key: unknown) {
export function trackEffects(dep: Dep) {
if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export let activeEffect: ReactiveEffect | undefined;
export type EffectScheduler = (...args: any[]) => any;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(
public fn: () => T,
public scheduler: EffectScheduler | null = null
Expand Down Expand Up @@ -41,7 +40,6 @@ export function track(target: object, key: unknown) {
export function trackEffects(dep: Dep) {
if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export let activeEffect: ReactiveEffect | undefined;
export type EffectScheduler = (...args: any[]) => any;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(
public fn: () => T,
public scheduler: EffectScheduler | null = null
Expand Down Expand Up @@ -41,7 +40,6 @@ export function track(target: object, key: unknown) {
export function trackEffects(dep: Dep) {
if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export let activeEffect: ReactiveEffect | undefined;
export type EffectScheduler = (...args: any[]) => any;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(
public fn: () => T,
public scheduler: EffectScheduler | null = null
Expand Down Expand Up @@ -41,7 +40,6 @@ export function track(target: object, key: unknown) {
export function trackEffects(dep: Dep) {
if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export let activeEffect: ReactiveEffect | undefined;
export type EffectScheduler = (...args: any[]) => any;

export class ReactiveEffect<T = any> {
public deps: Dep[] = [];
constructor(
public fn: () => T,
public scheduler: EffectScheduler | null = null
Expand Down Expand Up @@ -41,7 +40,6 @@ export function track(target: object, key: unknown) {
export function trackEffects(dep: Dep) {
if (activeEffect) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
}
}

Expand Down
Loading

0 comments on commit 873da6b

Please sign in to comment.