Skip to content

Commit

Permalink
fix(use-abortable-effect): add jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Mar 8, 2024
1 parent 6dc52bd commit d2a1685
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/use-abortable-effect/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'client-only';
import { type EffectCallback, useEffect as useEffectFromReact, type DependencyList } from 'react';

/** @see https://foxact.skk.moe/use-abortable-effect */
export const useAbortableEffect = (callback: (signal: AbortSignal) => ReturnType<EffectCallback>, deps: DependencyList) => {
useEffectFromReact(() => {
const controller = new AbortController();
Expand Down

0 comments on commit d2a1685

Please sign in to comment.