We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
setter
method
1 parent aba6500 commit 4bfcecfCopy full SHA for 4bfcecf
lib/hooks.tsx
@@ -48,13 +48,13 @@ export function useSpreadMethod<
48
V extends any[],
49
S extends string,
50
T extends TalkObject & Record<S, (...args: V) => any>,
51
->(box: T | undefined, args: V | undefined, setter: S) {
+>(box: T | undefined, args: V | undefined, method: S) {
52
args = usePreviousIfDeeplyEqual(args);
53
useEffect(() => {
54
if (args !== undefined && box?.isAlive) {
55
- box[setter](...args);
+ box[method](...args);
56
}
57
- }, [setter, box, args]);
+ }, [method, box, args]);
58
59
60
/**
0 commit comments