Deployment should be easy. It is not as I found out today. There are various requirements to consider:

  • Website should work with root domain as well as www domain. (example.com, www.example.com)
  • Only HTTPS should be supported.
  • Deploy to AWS EC2 instance with no other features like EBS or load balancer
  • There is no need for docker containers or hosted CI like Jenkins

I came up with the above requirements based on some research which I will outline shortly.…

Read More
react-redux

This is my attempt to help beginners learn React. React is a declarative UI framework. Component is the fundamental building block in React. It renders HTML based on data it has. React app contains a tree of component elements each rendering a little piece of HTML on the browser.

Analyse create-react-app

Install Node first and also Yarn which is a package manager (similar to NPM).…

Read More

Our UX Designer gave a SVG icon. Within the SVG icon, we want to add a badge.

At first glance, I was tinkering with the idea of absolutely positioning the badge within the SVG icon.

But there is a better alternative. SVG has a text element. It is possible to add a text element to the SVG icon provided by the designer.…

Read More

For most part, React is declarative. But there are times when we have to use imperative methods. This is quite common in React native. In React native, after an API call, we may use imperative methods for notifications or navigation. So, how do we handle this? Below is a code snippet of an action using redux-thunk.

export function callApi() {
  return dispatch => {
    dispatch({ type: ActionTypes.CallApiPending
Read More

React developers should be familiar with certain JavaScript code patterns. Once you understand these patterns, it is easy to review code written by other developers, review blog posts or StackOverflow answers. Let us get going.

1. Class with constructor

ES2015 introduces class keyword. Most developers use class with constructors to initialise object properties. We use state as an object property within a React component.…

Read More

During the Christmas holidays in 2017, I had some free time. I was looking to learn about Relay. There are not much Relay courses. But I found a good video course from Packt. And the course was authored by Divyendu Singh. I connected with Divyendu on Twitter. He is not only a great developer but a good person to know. So, I asked him if I could interview him for my blog.…

Read More