silx-kit / h5web

React components for data visualization and exploration
https://h5web.panosc.eu/
MIT License
161 stars 17 forks source link

Bring in `react-suspense-fetch` into codebase #1660

Closed axelboc closed 3 weeks ago

axelboc commented 3 weeks ago

Since react-suspense-fetch is no longer maintained but provides a good abstraction for our data providers (probably even after the next React 19 upgrade), and since we would really benefit from being able to introspect the internal cache of the valueStore to address #1578 properly once and for all, I bring in the library's source code into our codebase.

Of course, I also tweak it to my liking a bit:

In my next PR, I'll try to use the stores' built-in features to cancel requests and evict aborted responses from the cache, instead of our own complicated code in DataProviderApi.