@sampoder7+I’m really proud that I worked this out!! Published smth on :npm:
@rishi0Yellow hellow everyone! It’s the first day of winter break, and now that all my school stuff’s finished (having handed in what might, in hindsight, have been one of the worst essays of my life), I’ve found myself quite pretty bored!
I’m going to be challenging myself to build one cool thing every day (and maybe ship it either here or in #rishi if it’s smaller), so here’s the first one!
I’ve found myself working with asynchronous hooks in React a lot; whether that be to fetch data or just do timed stuff client-side, the normal integrations just don’t really cut it for me. That’s why I built my own library for those kinds of hooks! @rishiosaur/async is built in Typescript, and has some awesome documentation as a result (Typedoc really comin thru), and has two hooks that I use a lot in my daily React life: usePromiseEffect and useAsyncEffect, both of which are modelled to look like idiomatic React (I’ve attached an example of their usage down below).
:githubparrot: You can find the Github repo over at z.rishi.cx/g/async (feel free to star!),
:npm: The NPM package over at www.npmjs.com/package/@rishiosaur/async,
🏗️ And the documentation over at async.rishi.cx!
@christina6951Cloned a github repo, ran an npm install, and then modified the file in data.json- first time for all 3!
@caleb0I'm gonna try to get @scrappy to react with as many emojis as possible, for no particular reason.
@muirrum0Learned my lesson about rolling my own CSS aha, and Hack Night helped me remember why I despise NPM and node