Skip to content

Commit

Permalink
[TypeScript] Fix compilation fails with @types/react@17
Browse files Browse the repository at this point in the history
Closes #5949
  • Loading branch information
fzaninotto committed Feb 24, 2021
1 parent ea1f85c commit 2347636
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ra-core/src/util/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export function useSafeSetState<T>(
const mountedRef = useRef(false);
useEffect(() => {
mountedRef.current = true;
return () => (mountedRef.current = false);
return () => {
mountedRef.current = false;
};
}, []);
const safeSetState = useCallback(
args => {
Expand Down

0 comments on commit 2347636

Please sign in to comment.