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,8 +42,12 @@ class AddInstancePage extends HookWidget {
} }
}); });
useEffect(() {
instanceController.addListener(debounce); instanceController.addListener(debounce);
return () => instanceController.removeListener(debounce);
}, []);
handleOnAdd() async { handleOnAdd() async {
delayedLoading.start(); delayedLoading.start();
try { try {