set_interval possible somehow? #1132
-
hey, any advice appreciated :) greetings |
Beta Was this translation helpful? Give feedback.
Answered by
Archmonger
Aug 16, 2023
Replies: 1 comment 4 replies
-
The most common way of doing this is via a import asyncio
from reactpy import component, use_effect
@component
def example():
@use_effect
async def periodic_task():
while True:
await asyncio.sleep(1)
do_something() |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
Archmonger
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The most common way of doing this is via a
while True
loop within youruse_effect
hook.