Fork me on GitHub
#fulcro
<
2022-05-14
>
dvingo12:05:34

transact! is async, so to get the effect you want you will either need a synchronous transaction or local state - sync tx is mentioned here https://book.fulcrologic.com/#Inputs32 and in the docstring https://github.com/fulcrologic/fulcro/blob/develop/src/main/com/fulcrologic/fulcro/raw/components.cljc#L415 this pattern applies if you want to use local state: https://book.fulcrologic.com/#_dynamically_rendering_into_a_canvas

🙌 1
Carlo15:05:14

Thanks @U051V5LLP, your answer prompted me to try to reuse that component again, after reading the documentation you linked. In the end I was able to make it work even without local state nor sync transactions on the fulcro part. Turned out my error was simpler, but I learned a lot! In particular, when would you reach for sync transactions?