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
{{ message }}
Repository navigation
Events: support sending a call without waiting for earlier calls (wait: false) #155
Citry 0.5.1 documented opts.wait: false on $sendEvent and Citry.events.send to send a call without waiting behind earlier calls from the same component. In 0.6.0 the Vue Events bridge sends the calls from one Vue app one at a time, and wait: false now rejects the call with a TypeError that says so and points at @event(latest_wins=True).
Why it is not supported yet:
Each server render is built on the app revision the browser held when it sent the call (X-Citry-Vue-Revision), and the browser applies a render only on exactly that revision (validateIsolatedEnvelope in citry/_vue/client.js). If two calls are in flight and one commits a render, the other one's render can no longer apply, even when it is the newer call.
Each call carries the State token the previous call returned. Two calls in flight both start from the same token, so the server state changes of one are lost when the other's State action lands.
What a real implementation would need: a way for the server to build a render the browser can apply after another render (or for the browser to resend), and a rule for merging or ordering State tokens. Until then the rejection is the safe behavior.
What is done: the option is rejected with a clear error, and unknown option keys are rejected by name (citry-events-vue.tscheckSendOptions).
Activity