Resolving React Native version mismatch errors

Quick tip for getting unstuck when a RedBox `version mismatch` error is haunting your code.

Avoiding issues with Promises in your Cypress E2E tests

Using Cypress.Promise for consistency across Chrome and the Electron browser.

Tidy SQLite statements with JS Template Literals

While reviewing an open source React Native project I’d worked on recently, I was surprised with how difficult I found parsing the SQLite statements that I’d written in JavaScript. It seemed that my best efforts of breaking a long statement into multiple lines had added a number of characters which negatively affected the human readability of the code. Take the following CREATE TABLE statement as an example:

Using SQLite Dates in a React Native app

When I first began working with SQLite I was surprised to learn that there was no DATE or DATETIME datatype equivalent. Instead, time-based data must be stored as INTEGER, TEXT or REAL types. But, how can you logically order a TEXT-based date? How can you move seamlessly between Moment.js on the clientside and these primitive types in SQLite? Read on!