-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Description
function DeleteScheduleForm() {
const { someCondition, setSomeCondition} = useState();
const { isLoading, run } = useAsync({
deferFn: deleteSchedule,
});
useEffect(() => {
if(!someCondition) return
run();
}, [someCondition, run]);
// ...
}the useEffect requires run in the dependencies but this seems to be the cause of an infinite loop. the issue goes away if i ignore eslint and remove run from the list of dependencies
Metadata
Metadata
Assignees
Labels
No labels