2022-11-28
|~2 min read
|366 words
I’ve written previously about converting syncrhonous code into its asynchronous equivalent, but there’s an edge case that’s worth talking…
2022-11-28
|~3 min read
|575 words
When testing Javascript code in the DOM, there are few libraries I like as much as Testing Library. It’s really just a superb experience…
2022-11-28
|~3 min read
|555 words
Turns out Node has for exactly this purpose. From the docs: Asynchronous readdir(3). Reads the contents of a directory. The callback gets…
2022-11-28
|~3 min read
|480 words
Frequently, I find myself needing to mock out (or fake) an asynchronous call to test my API I’m developing. I hate having to remember the…
2022-11-28
|~1 min read
|116 words
I was recently working on a project where I wanted a loading state while an API resolved. Instead of testing with a live API, I wanted to be…
2022-11-28
|~5 min read
|819 words
I often find myself looking up patterns for converting synchronous code into async variants in Javascript. Whether it’s remembering how…
2022-11-28
|~3 min read
|531 words
If I’m working on a React application that is trying to render data based on an asynchronous call, there are three common cases I should…
2022-11-28
|~5 min read
|843 words
When all you have is a hammer, every problem looks like a nail. When approaching new problems, it’s easy to fall into old ways of doing…