Invalidate during an action()
If you have an action attached to a form, and you call invalidate and await that, the rest of the action never runs.
"foo" never logs and things just get stuck where they are. If I don't await it works, but I think that is just luck of timing. What is the real deal here?
"foo" never logs and things just get stuck where they are. If I don't await it works, but I think that is just luck of timing. What is the real deal here?
1 Reply
wise-whiteOP•16mo ago
It looks like these are not async functions, and just use promise structure. Other than maybe the background fetching. So the invalidation marking is immediate, and if you don't await that is guaranteed to happen, yes? So the await which is locking up isn't neccessary as the refetch will happen later and in time for any consumer. correct?
Nope, it does do a race and loses.