Tag: JavaScript

Understanding React Lifecycle Methods

React Lifecycle Methods are one tricky piece of business, especially if you’re coming from a framework that doesn’t have their own. Thankfully, they’re fairly similar to Android’s lifecycle methods and it wasn’t long before I was able to grasp them. React has changed a lot over the past few years and it’s lifecycle methods are… Read more »

Fetching Data with React Hooks

React hooks have changed the way that I (and arguably the React Community) prefer to build components. I’ve been working on a GraphQL project for a while, and when we migrated to functional components and hooks, I was able to use Apollo’s hooks for my data fetching needs. However, I find myself now working on… Read more »

A Quick Script to Update All of Your NPM Dependencies

Nothing crazy here, I’ve just found myself chaining together pipes for something that I feel should ship with NPM. You can use this script to update all of your outdated dependencies to the latest. This is something you’ll want to do cautiously, definitely don’t run this and commit it without testing. However, if you have a pretty solid test suite, you can integrate something like this into your CI pipeline and fix forward should you find any issues.

A brief summary on Automated Testing

I recently read this amazing article by Josh Mock and felt the need to share it. In fact, the tools he uses in his examples – JavaScript, Mocha+Chai, and Phantom are the tools I use daily to do the same thing. I can’t stress enough how great his article is, especially if you’ve written some… Read more »

JavaScript – Generators

One thing I’ve learned recently from Clojure (don’t worry, this post is about JavaScript) is that laziness is great. Lazy code is powerful code, allowing you to model things like infinite sequences or complex computations over a range of data. Without this laziness, an infinite sequence would cause a stack overflow or complex computations would… Read more »

A Brief Comparison of FlowRouter and Iron:Router for Meteor.js

Recently, I was updating an open source package that I maintain – a project structure scaffolding tool. While updating the template I use for my Meteor apps, I realized my tool was still catering towards Iron:Router. For those unaware, Iron:Router has a history of being the Router for Meteor apps. When I first used it,… Read more »