orbitjs / orbit

Composable data framework for ambitious web applications.
https://orbitjs.com
MIT License
2.34k stars 133 forks source link

Integration with AbortSignal #961

Open bradjones1 opened 2 years ago

bradjones1 commented 2 years ago

I'm integrating Orbit with a React Native app and I'd like to gracefully clean up outstanding network requests/async procedures in my useEffect() implementations.

As far as I can tell, Orbit doesn't have existing integration with, say, AbortController... I think that would also mean Orbit would have to cancel whatever active transform called fetch, and do whatever other cleanup is necessary.

bradjones1 commented 2 years ago

Issue archaeology: https://github.com/orbitjs/orbit/pull/635

The approach in the above PR seems to look like it's a global abort, vs. being able to cancel individual transforms? This is a bit afield of my JS skill at the moment but worth linking to prior art/conversation.