Robert Jaros
08/05/2024, 2:56 PMkotlin-react 754
, but it doesn't compile anymore (EffectBuilder
was replaced with CoroutineScope
and cleanup
function is no longer available):
useEffect {
// ...
cleanup {
// ...
}
}
What should I use now?Robert Jaros
08/05/2024, 3:14 PMuseEffectWithCleanup {
onCleanup {
}
}
turansky
08/08/2024, 9:33 AMonCleanup
?Robert Jaros
08/08/2024, 9:34 AMturansky
08/12/2024, 9:34 PMsuspend
API (with auto-cleanup) 😉