Skip to content

Commit

Permalink
refactor(useMount): no need to add optional when invoking fn
Browse files Browse the repository at this point in the history
  • Loading branch information
FEliuyg committed Jul 9, 2024
1 parent b2f1218 commit 70028e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hooks/src/useMount/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const useMount = (fn: () => void) => {
}

useEffect(() => {
fn?.();
fn();
}, []);
};

Expand Down

0 comments on commit 70028e3

Please sign in to comment.