Once upon a time JavaScript was used to add a small sprinkling of interactivity to otherwise static web pages. Times have changed since then. People now expect entire applications delivered in the browser. Applications need data, and the best way to get data to a Frontend app is to make
Month: January 2020
How to write custom hooks in React
Hooks have been the latest hotness in React for a while now. They come with certain advantages like reducing the need for render props (god thank you!) and being able to have state in function based components. If you haven’t used them yet, I really recommend you check out the
JavaScript: ES6 modules made simple
Before ES6 there was no native system in JavaScript for importing modules. There were tools like commonjs, but nothing built into the language spec. Every other major language seems to have a way to do this, so the fact that JavaScript lacked this did lend credence to the people who
JavaScript: Transforming arrays using map
If you’ve done even the most basic coding in JavaScript, I’m sure at some point you’ve used a for loop to iterate an array. This works just fine, but did you know that Array.prototype (the base array object) contains a number of functions that make performing common tasks based on