Creating a Drag-and-Drop File Uploader with React & TypeScript

A while ago, I was working on a project based off the Atomic SPA Starter Kit, which uses TypeScript, React, and GraphQL. One of the features we needed to build was a file upload component that supported dragging and dropping a file from a separate window onto the UI. Read more on Creating a Drag-and-Drop File Uploader with React & TypeScript…

Managing Data Loaders in Node.js with Shared State

When developing software, it’s always tough to work with caching. While my team appreciates the efficiencies that Data Loader can provide for applications, we still struggle with the same problems that always come up when caching queries, mainly invalidating caches when a data set has changed. Read more on Managing Data Loaders in Node.js with Shared State…

Styling Custom Components in React Native Using TypeScript

I recently ran into an issue with providing style properties to custom React Native components written in TypeScript. When defining the type of the style property, we were using the ViewStyle and TextStyle types provided by React Native.

Read more on Styling Custom Components in React Native Using TypeScript…

Type-Safe Object Merging (TypeScript 2.8 Edition)

There are times when you want to merge two generic types in TypeScript, and type inference just isn’t doing it for you. Object.assign’s typing isn’t as precise as it could be, and spreading generics still doesn’t work. I’ve found a way to implement typing when merging objects using some of the new features in TypeScript 2.8.

Read more on Type-Safe Object Merging (TypeScript 2.8 Edition)…

Excel Snapshot Testing with Node

A couple of weeks after I worked on PDF snapshot testing with Node and GraphicsMagick, I was tasked with writing some code to generate downloadable Microsoft Excel Workbook files. I thought I would use snapshot comparisons again, much as I did with PDF files to automatically detect regressions in the implementation. Read more on Excel Snapshot Testing with Node…

PDF Snapshot Testing with Node and GraphicsMagick

The task I am working on this week involves generating downloadable PDF files for customer and supplier orders. We’d like to drive the implementation using tests and be able to find any regressions in the code automatically.

After looking at different alternatives for accomplishing this, we decided to try a visual snapshot approach similar to the way Jest does snapshot testing.
Read more on PDF Snapshot Testing with Node and GraphicsMagick…