Skip to content

Commit

Permalink
Merge branch 'master' of github.com:alibaba/hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
brickspert committed Jul 11, 2021
2 parents c2b4ccb + 16ef302 commit 5abb38c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/hooks/src/useUnmountedRef/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { useRef, useEffect } from 'react';
const useUnmountedRef = () => {
const unmountedRef = useRef(false);
useEffect(() => {
unmountedRef.current = false;

return () => {
unmountedRef.current = true;
};
Expand Down

0 comments on commit 5abb38c

Please sign in to comment.