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
How do we handle async transitions that resolve out of order? In the above reproduction the search for "a" can resolve after "ab", leading to the input containing "ab" but the results pertaining to "a". In other words, the most recent transition isn't the one that wins.
In other discussions it's been mentioned that this is caused by React losing the context that the setState happens inside a transition as it happens after await. But I'm not sure how to work around this today
The text was updated successfully, but these errors were encountered:
Summary
Repro: https://stackblitz.com/edit/vitejs-vite-ymbqrc?file=src%2FApp.tsx
How do we handle async transitions that resolve out of order? In the above reproduction the search for "a" can resolve after "ab", leading to the input containing "ab" but the results pertaining to "a". In other words, the most recent transition isn't the one that wins.
In other discussions it's been mentioned that this is caused by React losing the context that the setState happens inside a transition as it happens after
await
. But I'm not sure how to work around this todayThe text was updated successfully, but these errors were encountered: