Eric Clemmons, CEO of JavaScript Fatigue @ericclemmons.com Β· Jan 10

πŸ“Ί How I fixed a race-condition with @tanstack.com Router & @react.dev's flushSync πŸ‘‡ 🌐 react.dev/reference/re... 🌐 tanstack.com/router/lates... (60s is too short πŸ₯΅)

13 likes 1 replies

?

Replies

Ricky Β· Jan 10

Is logout called in a click event? If so it would be rendered synchronously at the end of the event if you move it before the await. I think if you did that, then you don’t need the flushSync, which has other side effects you probably don’t want