conert listener to utilize `useEffect`

This commit is contained in:
krawieck 2020-09-23 23:31:34 +02:00
parent ff0c2829f6
commit 1fb221a034
1 changed files with 5 additions and 1 deletions

View File

@ -42,7 +42,11 @@ class AddInstancePage extends HookWidget {
}
});
instanceController.addListener(debounce);
useEffect(() {
instanceController.addListener(debounce);
return () => instanceController.removeListener(debounce);
}, []);
handleOnAdd() async {
delayedLoading.start();