Dumping redux state on log out

When a user signs out of my mobile app and signs in as a different user, we need to make sure no application state can be carried over. Adding a simple ‘LOGGED_OUT’ action that drops the application state is a straight forward solution. I’m keeping a few properties. Here’s the normal reducers object that is […]

Handling payments securely in React Native

I’m rebuilding an e-commerce mobile app side project (WooToApp) that requires payment for orders created. The initial gateway is Paypal, but it’s an important part of the mobile app that there could be many more gateways, so the architecture needs to be re-usable and secure. Basic architecture Assumptions We need to assume that the mobile […]

Intro to AWS using CLI tools

Following along some useful youtube videos, I’ve created a cheat sheet below for reference when setting up AWS services using the CLI tools. This post assumes a level of familiarity with basic AWS services through the management console – you should know what a security group is and what an instance is, etc. Youtube videos: […]

Deploying a React Native Web project with CircleCI

Generate a private & public SSH key for the CI server. Paste the private key into circle CI. Grab the key fingerprint from circle CI for later. Paste the public key into ~/.ssh/authorized_keys/ on the host. Create a .circleci folder in the root of your project with a config.yml file underneath. Adjust the following circle […]

Forcing use of Yarn, instead of npm install

Everyone knows if there’s a package.json, then you need to npm install to install dependencies for the project. Unless there’s a yarn.lock! When sharing a project around a team this will happen over and over. Share project -> team mate ignores instructions -> generates & checks in a package-lock.json. Packages are resolved differently, different bugs […]

WooCommerce TypeScript definitions

I’m working on a project that consumes WooCommerce API in React Native. To keep everything up to date, use type-hinting, and see dynamic issues *before* I’ve compiled the code, I’m using TypeScript definitions for WooCommerce. Type definitions are supplied for Category, Product, Variation, Attribute, Image. Other less important types are also included (Collection, Dimensions, MetaData, […]

Accessing local index.html from outside world with zero config

On a development box with nginx or vagrant set up and a bunch of virtual hosts, this is pretty straight forward. Grab the folder, push it to a dev server, set up a virtual host and go. Since largely moving away from day to day web development I don’t have a local vagrant box. I […]