Even though Node.js has great out-of-the-box support for asynchronous programming and promises with its async/await syntax, it doesn’t include the ability to add a timeout to these promises. I had to deal with this on a recent React Native project while integrating with a third-party library. This library had a number of functions that were […]
On the surface, REST API design looks to be quite simple. You just need to follow some conventions for your URL paths and return an appropriate HTTP status code. But the reality of the networked world and the needs of your API consumers often go beyond what standing up a REST API can offer you. […]
We’re building a hybrid mobile app out of an existing web app. The front end will run out of a webview, and we’re adapting the back end to run on-device in [React Native]. One of the challenges we encountered was how to share code between our existing [monorepo] built with [webpack] and our new React […]
It can take a long time to get a full-stack React and Node.js app off the ground. Fortunately, with the addition of API Routes, Next.js offers a way to do that in just minutes.
Recursion (solving smaller and smaller sub-problems until arriving at the base case) has always intrigued me. The first recursive function I ever wrote computed the factorial for n, and it looked like this: def recur_factorial(n): if n == 1: return n else: return n*recur_factorial(n-1)
My attitude toward CSS used to be that it is simply unmaintainable. If in the course of development, you think things like: These styles are already a mess, so I can’t make it any worse. I can’t figure out why this is getting overridden, so I’ll just use !important. It seems like these styles are […]