Soulscode
Soulscode
SSolara
Created by Soulscode on 3/13/2024 in #questions-issues
Can't cancel running @task?
I've got a button triggered function that executes a for loop over a data set list and makes an API call for each. I added the @task decorator to keep it from holding up the UI, and a button triggered function to cancel the task(with a running check first). However, when I trigger the task(and I can see for sure that it's running from console logs), calling the task.cancel() didn't work. I threw in some log entries to check the task state, and they all indicate that the task isn't running(pending/is_current False, not_called True). Any ideas? I'll post the code shortly, I don't get discord on the work computer, so example code is a pain to bring over.
3 replies
SSolara
Created by Soulscode on 2/22/2024 in #questions-issues
Conditional Hook issues
I have a fair sized data set, and I have a switch that's on by default to not display a portion of the data to the UI.
Turning off the switch works as expected, causing the filtered data to be displayed, but if I toggle the switch back on, I get a conditional hooks runtime error because there are less effects in the render loop, but this is expected. Any suggestions on how to get around this?
3 replies
SSolara
Created by Soulscode on 11/28/2023 in #questions-issues
Component callback behavior
Is it expected for components to trigger the callback function on initial load?
5 replies