Get my FREE "How to Start a SMMA in the UK"
E-Book Delivered straight to your Inbox!

Redux’s First Principles

Principle 1 - Redux has a single source of truth - and object that contains all of your applications state. This single source of truth is a state tree that is simply an object containing functions (methods) and other data. Principle 2 - Redux state is read-only and cannot be mutated. The only way to mutate the state is to emit an action. An action is an object describing what happened. Principle 3 - Redux mutations are written as pure functions A reducer is a pure function you write to implement the update logic of your app, that is how the next [...]

By |2019-08-24T23:44:57+01:00August 31st, 2018|

I had a thought…

As I was refactoring my application that once used Pug, Gulp and Express, and now uses Express with React, Redux and Webpack, I had a thought... I am running into so many problems because I now have a layered architecture i.e. Express, React vs. Express, Pug. Why don't I, after solving every significantly time consuming problem, write down the issue and the solution. Then, if I ever run into a similar problem again in the future, I can refer to these notes. So I have decided to do just that, and I will be storing all of these solutions on this website under [...]

By |2018-08-27T12:22:52+01:00August 27th, 2018|

Something I wish I knew 7 days ago…

Before I began migrating my Express with Pug (the template/view engine) to a server side rendered React app, I wish somebody told me this one thing: "For anything that is going to show HTML, you are always going to make sure that React Router is in charge of making that request" This one line of spoken word would have saved me in excess of 20 hours. I do not regret those 20 hours that I did spend trying to essentially integrate React with Pug and somehow render React server side. Those hours were, in fact, well spent. But I was [...]

By |2019-08-24T23:45:53+01:00August 15th, 2018|

React isn’t easy to learn…

Wow... It's been a while since I've posted. Anyway, now I've graduated and I'm running my business full time. And over the past few months I have been learning React. When I started learning, I thought it was a easy. "It's basic, simply importing components here and there," I said to myself. Little did I know the extent to which you can develop complex software, and the sheer flexibility it gives you. Let's not even begin with Redux and state management. I'm still learning how to properly build with React! The more I learn, the less I know. It's extremely [...]

By |2019-08-24T23:45:37+01:00August 8th, 2018|