Skip to content

Commit edf3dbf

Browse files
authored
fix: change callback type to React.EffectCallback (#10)
* fix: change callback type to React.EffectCallback * fix: import the type directly
1 parent 6bf4723 commit edf3dbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { useEffect } from "@rbxts/react";
1+
import { EffectCallback, useEffect } from "@rbxts/react";
22

33
/**
44
* Runs a callback when the component is mounted.
55
* @param callback The callback to run.
66
*/
7-
export function useMountEffect(callback: () => void) {
7+
export function useMountEffect(callback: EffectCallback) {
88
useEffect(callback, []);
99
}

0 commit comments

Comments
 (0)