File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
kotlin-react-use/src/jsMain/kotlin/react/use Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 11package react.use
22
3+ import js.coroutines.awaitCancellation
34import react.useEffect
45import web.events.*
56
@@ -17,7 +18,7 @@ fun <E : Event> useEventListener(
1718 useEffect(target, type) {
1819 target ? : return @useEffect
1920
20- awaitCleanup (
21+ awaitCancellation (
2122 target.addEventHandler(
2223 type = type,
2324 options = options,
Original file line number Diff line number Diff line change 11package react.use
22
3+ import js.coroutines.awaitCancellation
34import react.useEffectOnce
45
56/* *
@@ -11,6 +12,6 @@ fun useUnmountEffect(
1112 val latestCallback by useLatest(callback)
1213
1314 useEffectOnce {
14- awaitCleanup (latestCallback)
15+ awaitCancellation (latestCallback)
1516 }
1617}
You can’t perform that action at this time.
0 commit comments