Skip to content

Commit 4bfcecf

Browse files
committed
refactor: Rename setter parameter to method
1 parent aba6500 commit 4bfcecf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/hooks.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ export function useSpreadMethod<
4848
V extends any[],
4949
S extends string,
5050
T extends TalkObject & Record<S, (...args: V) => any>,
51-
>(box: T | undefined, args: V | undefined, setter: S) {
51+
>(box: T | undefined, args: V | undefined, method: S) {
5252
args = usePreviousIfDeeplyEqual(args);
5353
useEffect(() => {
5454
if (args !== undefined && box?.isAlive) {
55-
box[setter](...args);
55+
box[method](...args);
5656
}
57-
}, [setter, box, args]);
57+
}, [method, box, args]);
5858
}
5959

6060
/**

0 commit comments

Comments
 (0)