ES6
Fetching a File in NodeJS with Request and Parsing It with Readline
Recently, I was working on a project where I needed to fetch a file from the internet and parse it line by line. NodeJS has the readline module that can be used to split a data stream into lines and perform a function on each line, which was perfect for my needs. The problem is…
Read MoreAutomatically Creating Github Issues Using Webtask.io
I am the co-organizer of the BeerJS meetings for TahoeJS. BeerJS is a casual meetup for JavaScript developers that has chapters all over the world. Our meetup is largely organized using a Github repo. As co-organizer, one of my monthly tasks is to create a Github issue for the upcoming meeting. The issue announces the…
Read MoreBreaking Change with setState in React 16 Alpha Affecting React Native 43+
Recently, I upgraded the React Native app at Build.com to version 45.1. While testing the app, we discovered an undocumented change to the way that setState works. This change will affect React Native version 43+ and is due to a change in the React 16 alpha library. In this post, I’ll describe this breaking change…
Read MoreReact Native 45 Errors in Jest
At Build.com, a co-worker and I are in the process of updating our app to the most recent version of React Native, 0.45.1. We’re currently working to fix up our tests in Jest and I thought I’d share with you some issues that we’ve discovered.
Read MoreAdding Support for ES2015 Number Methods to iOS 8
At Build.com, I’m working on an e-commerce app using React Native. React Native allows us to write apps in JavaScript that can run on iOS and Android phones with near native performance. The other day, we received several crash reports from users running iOS 8. All of the reports involved method calls on JavaScript’s global…
Read MoreHandling the “possible EventEmitter memory leak detected” Error in React Native
The project that I’m working on is an e-commerce app for an online retailer, Build.com, built using React Native. React Native is a JavaScript framework that allows you to build cross-platform mobile apps in JavaScript that have near-native performance. While we use Redux to handle the state of our app and its data, occasionally we…
Read MoreHandling a Null Response from an API
I’ve been working with React Native lately, which uses the Fetch API for asynchronously fetching data from web services. Recently, I came across a really strange error. Certain calls (in particular, calls to fetch data for new users) would cause an error, “Unexpected end of JSON”.
Read MoreSorting Arrays with JavaScript iterators
A lot of front-end web development involves displaying sorted lists on a page and maintaining the state and logic of the list. These sorted lists may be things like a list of products or an employee directory. Often, we will give the user the ability to re-sort the list or sort by a different key.…
Read MorePreparing Your Angular 1 Code For Angular 2 (Part 2)
This post is Part 2 of a series of blog posts where I’ll convert an Angular 1.x project to Angular 2. In Part 1, I upgraded the Angular client to use the latest guidelines in the John Papa Angular Style Guide. Node.js has improved by leaps and bounds since I first wrote the Phone Cat…
Read More