Skip to content

Commit

Permalink
Remove unnecessary mention of isMounted from scheduling useEffect hook.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Aug 30, 2020
1 parent e5dc061 commit 6ff6124
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/plugins/es_ui_shared/public/request/use_request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@ export const useRequest = <D = any, E = Error>(

// Schedule the next poll request when the previous one completes.
useEffect(() => {
if (isMounted.current === false) {
// Don't schedule a request on component mount.
return;
}

// When a request completes, attempt to schedule the next one. Note that we aren't re-scheduling
// a request whenever sendRequest's dependencies change.
if (!isLoading) {
Expand Down

0 comments on commit 6ff6124

Please sign in to comment.