Skip to content

Commit

Permalink
chore: minor rename
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Oct 22, 2023
1 parent 0d6eb71 commit 1d56e0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/tiny-transition/src/lagged/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export function useLaggedBoolean(
value: boolean,
options: LaggedBooleanOptions
): LaggedBooleanState {
const [lagged] = useState(() => new LaggedBoolean(value, options));
const [manager] = useState(() => new LaggedBoolean(value, options));

useEffect(() => {
lagged.set(value);
manager.set(value);
}, [value]);

return useSyncExternalStore(lagged.subscribe, lagged.get, lagged.get);
return useSyncExternalStore(manager.subscribe, manager.get, manager.get);
}

0 comments on commit 1d56e0b

Please sign in to comment.