You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently tried to update an Incr_dom project with some code that uses effect handlers and ran into some issues. I've made a reproduction repo at incr_dom_effect_issue, and would appreciate advice on how to proceed.
While the example in the repo is reduced to something much simpler, the actual motivation for using effects in the first place is to synchronously wait on asynchronous javascript functions. I'm aware that this has drawbacks for the ui, but it seems reasonable in my case, as the asynchronous functions don't take long and are only called after button presses. If there's a more direct way to use asynchronous javascript functions from within Incr_dom I'd be happy to use it, but this feels like the "shape" of thing effects are good for, so I figured I'd ask the broader question.
Thanks,
Fitz
The text was updated successfully, but these errors were encountered:
Incr_dom hasn’t been tested with effect handlers yet, so I’m not surprised that there are issues. Could you describe the problem that you’re running into though?
Oh sorry, I see now that you said that the effect triggers an “unhandled” exception. Thats expected because Incr_dom.start just schedules stuff to happen on future frames and it returns immediately, so your handler is done
Ah that makes sense. I don't have a good understanding of how Async ends up getting compiled to javascript, so it's possible I have a fundamental misunderstanding, but is there some way to effectively define my handler around the equivalent of Scheduler.go?
I'll also explore whether it's possible to move my effect handler into the apply_action function.
Hi,
I recently tried to update an
Incr_dom
project with some code that uses effect handlers and ran into some issues. I've made a reproduction repo at incr_dom_effect_issue, and would appreciate advice on how to proceed.While the example in the repo is reduced to something much simpler, the actual motivation for using effects in the first place is to synchronously wait on asynchronous javascript functions. I'm aware that this has drawbacks for the ui, but it seems reasonable in my case, as the asynchronous functions don't take long and are only called after button presses. If there's a more direct way to use asynchronous javascript functions from within
Incr_dom
I'd be happy to use it, but this feels like the "shape" of thing effects are good for, so I figured I'd ask the broader question.Thanks,
Fitz
The text was updated successfully, but these errors were encountered: