Managing state in modern React web applications

Published on October 16, 2018 in React · Read time 9 minutes

Overview This post details a presentation I gave at my local JavaScript North-West Meetup on 16th October 2018 at Dept Digital Agency in Manchester, UK. Below are the accompanying notes I wrote that acted as a rough speaking guide, and may or may not have been spoken during the event itself. Assumptions Throughout this talk I will assume that you have at least a working to intermediate knowledge of JavaScript and React concepts, and that you have at least worked with React in some capacity in the past. This is, after all, a presentation on React. This is not a course for beginners, or introductory level. This presentation assumes that you are using at least version 16.3 of React JS, this is because the refreshed version of Context was not released until this version. Please ask questions as we go along as others may find the answers helpful. Should your question require a long time to answer, I may defer the answer until after the presentation is over. (Come speak to me afterwards). What is state? At a basic level, state is what allows you to create components that are dynamic and interactive. State enables users to interact with your application. Without state, your…

A bare bones React boilerplate, featuring Webpack 4, React, Redux, Jest, and Babel 7

Published on September 22, 2018 in React, Webpack, JavaScript · Read time 5 minutes

I love template projects. In fact, I use them all the time. Template projects, seed projects, starter projects, whatever you want to call them, they are fantastic. Starter templates help you get up and running very quickly and can be very useful and powerful when learning something new. Many template projects I see around the web are bloated with every feature under the sun. Having a long list of features can be amazing, however, some projects have grown significantly… which can increase complexity, the learning curve, bundle size, and reduce performance. Under no circumstances am I suggesting that using a popular open source larger starter project is a bad idea. However, when working on projects I like to start with the minimum feature set required to get the project off the ground, and then add features on demand. I created a repository on GitHub to cater for my exact needs, webpack 4 scratch . The post provides an overview of the out-of-the-box functionality and reasoning behind decisions made. Overview Before we get into the details, lets answer the most important question first. What functionality does this starter provide? React, Redux and React Router pre-configured out-of…