Replies: 2 comments
-
When using the |
Beta Was this translation helpful? Give feedback.
-
Hmm, yeah it doesn't sound like serial queueing is going to solve your problem. Without seeing the code it's a little challenging to know what a good solution might be. You could use a nested component for your long-running process and when it's done run some JavaScript to... do something? Re-rendering other components might be disruptive, but that's an option. Show a "refresh" button (ala GitHub when looking an out of date PR)? I'd love to hear what you end up doing to solve for this! |
Beta Was this translation helpful? Give feedback.
-
I have a component that generates suggestions on user interaction. This process takes while (around 3-10 seconds). If the user clicks other buttons and interacts with the component in the meantime, race conditions can happen where parts of the site are shown with an old-state.
I already tried to use the
SERIAL
setting but it is not ideal in my use case because the user would have to wait potentially several seconds for anything to happen at all.My idea would be to set
unicorn:partial
for the result of the long-running request but ideally also somehow mark that I only modified variableX
in the state and that only this variable should be updated on the client side state.Beta Was this translation helpful? Give feedback.
All reactions