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 […]
Author Archives: rrrhys
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 […]
RCU and WCU (Read Capacity Units, Write Capacity Units) and DynamoDB
RCU: 1 read per second of 4kb STRONG RCU: 2 read per second of 4kb EVENTUAL WCU: 1 write per second for 1kb.
Notes: Building a React App using Lambda, Dynamo DB and API Gateway – Part 1 (The back-end)
These are notes and additions from working through this youtube video. In the video and in the notes below, the AWS CLI is used to configure Lambdas, a Dynamo DB and an API Gateway. Setting up an IAM user Visit the IAM Console and create a ‘Programmatic Access’ user. Add the user to ‘Administrator’ group. […]
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, […]
Converting React Components to use Hooks (useEffect and useState)
This isn’t a finished article, it’s a work in progress. I’m learning React Hooks, so there may be factually inaccurate information below. Let me know if you know that to be the case! Functional Stateless Components are prerequisite learning to Hooks. Functional components are a function that accepts props and returns a React component. Hooks […]
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 […]