Skip to content

Commit

Permalink
Update packages/mui-utils/src/useOnMount/useOnMount.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Aarón García Hervás <aaron.garcia.hervas@gmail.com>
Signed-off-by: Mark <markliu2013@gmail.com>
  • Loading branch information
markliu2013 and aarongarciah committed Jul 25, 2024
1 parent 698e564 commit 176a300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mui-utils/src/useOnMount/useOnMount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const EMPTY = [] as unknown[];
* A React.useEffect equivalent that runs once, when the component is mounted.
*/
export default function useOnMount(fn: React.EffectCallback) {
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- 'fn'. Either include it or remove the dependency array
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array
/* eslint-disable react-hooks/exhaustive-deps */
React.useEffect(fn, EMPTY);
/* eslint-enable react-hooks/exhaustive-deps */
Expand Down

0 comments on commit 176a300

Please sign in to comment.