Came to say the exact same thing... for those reading, the latest Node versions already support async iteration against readable streams, which is so much cleaner than some other options.
Hmm... if only there were a site for this already... maybe with a comments section... maybe a similar UX to say hacker news, but specific to JS... oh yeah, we could call it Echo JS.
Would be better to use async functions. Supported in all modern browser for quite a while as well as in node for several years. Not to mention via Babel since before the name change (iirc).
I think the hooks interfaces are definitely interesting... as is seeing a lot of considerations as to integrating state management in thoughtful ways.
I do hope that it doesn't bloat the reactdom stuff too much if you aren't using it. Right now react-dom and chartjs are the biggest chunks in my two biggest output bundles...
OMG! That is gorgeous and nifty AF. Love it...
I really do like it a lot... though, I'm not even sure where to begin to be able to test the behaviors... May want to add at least a couple examples for unit testing against with say jest/enzyme.
Interesting project, but wish it would also handle making certain to request additional storage when needed. Also, the cookie storage should be disabled by default as it can dramatically increase request times to/from the server. All cookie data needs to be transmitted and parsed by the server on EVERY request.
---
rant on web-sql ahead
I know that creating a minimal definition for "web sql" was hard, but I'm constantly dissapointed that MS didn't just adopt SQLite at a compatible version for IE/Edge. They're using it in Windows 10.
In the end it could have been a very pragmatic choice for a lot of this. For the most part now, I stick to local/session storage interfaces for k/v storage and don't worry about it. All the current browsers support it, and it's relatively transparent.