vobyjs / voby

A high-performance framework with fine-grained observable/signal-based reactivity for building rich applications.
https://voby.dev
MIT License
891 stars 22 forks source link

useResource does not properly guard against outdated promises #33

Closed derolf closed 11 months ago

derolf commented 11 months ago

Clicking quickly on "increment" in https://stackblitz.com/edit/vitejs-vite-69hjfc?file=src%2Fcounter.tsx makes the Suspense leak.

I assume that useResource does not "drop" a promise that is outdated.

Example: https://gist.github.com/derolf/77dfbd21ac6804537c4927590af16aad#file-observablefrompromise-ts-L25

fabiospampinato commented 11 months ago

Fixed in latest