conert listener to utilize `useEffect`
This commit is contained in:
parent
ff0c2829f6
commit
1fb221a034
|
@ -42,7 +42,11 @@ class AddInstancePage extends HookWidget {
|
|||
}
|
||||
});
|
||||
|
||||
instanceController.addListener(debounce);
|
||||
useEffect(() {
|
||||
instanceController.addListener(debounce);
|
||||
|
||||
return () => instanceController.removeListener(debounce);
|
||||
}, []);
|
||||
|
||||
handleOnAdd() async {
|
||||
delayedLoading.start();
|
||||
|
|
Loading…
Reference in New Issue