use_async_effect cleanup not executed in 2.0.0b7 #1326
-
|
Hello, First of all, thank you for this project. I’ve been using ReactPy 2.0 in a couple of small pet projects, and it’s been really nice to work with so far. As I mentioned in the title, the cleanup function is not executed when the dependency of the diff --git a/tests/test_core/test_hooks.py b/tests/test_core/test_hooks.py
index 93e64a69..434d7ad3 100644
--- a/tests/test_core/test_hooks.py
+++ b/tests/test_core/test_hooks.py
@@ -451,8 +451,8 @@ async def test_memoized_effect_cleanup_only_triggered_before_new_effect():
def ComponentWithEffect():
state, set_state_callback.current = reactpy.hooks.use_state(first_value)
- @reactpy.hooks.use_effect(dependencies=[state])
- def effect():
+ @reactpy.hooks.use_async_effect(dependencies=[state])
+ async def effect():
def cleanup():
cleanup_trigger_count.current += 1
Thank you in advance |
Beta Was this translation helpful? Give feedback.
Answered by
Archmonger
Jan 24, 2026
Replies: 1 comment 1 reply
-
|
Thank you for the bug report. I will investigate this ASAP. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed in #1328