Skip to content

Commit 657b107

Browse files
authored
refactor: remove stability guard (#35)
1 parent 30771a8 commit 657b107

File tree

4 files changed

+0
-38
lines changed

4 files changed

+0
-38
lines changed

src/state-wire/use-subscribe.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { useEffect } from 'react';
22
import { Defined } from '../utils/type-utils';
3-
import { useStabilityGuard } from '../utils/use-stability-guard';
43
import { ReadonlyStateWire } from './readonly-state-wire';
54

65
export function useSubscribe<V>(
76
wire: ReadonlyStateWire<V>,
87
callback: (value: Defined<V>) => void,
98
): void {
10-
useStabilityGuard(wire);
119
useEffect(() => {
1210
return wire.subscribe(callback);
1311
}, [wire, callback]);

src/utils/use-stability-guard.test.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/utils/use-stability-guard.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/wire/use-wire.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { useMemo } from 'react';
22
import { useFnsWire } from '../fn-wire/use-fns-wire';
33
import { useStateWire } from '../state-wire/use-state-wire';
44
import { InitializerOrValue } from '../utils/is-initializer';
5-
import { useStabilityGuard } from '../utils/use-stability-guard';
65
import { Wire } from './wire';
76

87
export function useWire<V, Fns = {}>(upLink: Wire<V, Fns>): Wire<V, Fns>;
@@ -22,7 +21,6 @@ export function useWire<V, Fns = {}>(
2221
upLink: Wire<V | undefined, Fns> | null | undefined,
2322
initialValue?: InitializerOrValue<V | undefined>,
2423
): Wire<V | undefined, Fns> | Wire<V, Fns> {
25-
useStabilityGuard(upLink);
2624
const fnsWire = useFnsWire(upLink);
2725
const stateWire = useStateWire(upLink, initialValue);
2826

0 commit comments

Comments
 (0)