Articles
Strava API activity sync with Axios, React, Redux & Saga - part 1
Dec 13, 2020
π
10 minutes readπ
ArticleWhy?
I've been using Strava for over 5 years to track my activities, and more recently analyse them too. Towards the end of 2019 I realised that I was getting close to running 1,000km in a year, so I started a basic spreadsheet to track the data so that I...
Styling React apps - what are the options?
Nov 1, 2020
π
9 minutes readπ
ArticleWhen building a React app there are a number of ways you can styles your components and layout. These range from plain CSS classes on elements through to fully integrated style libraries that handle building the styles and creating class names for you.
Th...
Getting to grips with CSS variables
Oct 21, 2020
π
3 minutes readπ
ArticleIf you have ever used JavaScript variables then the concept of CSS variables should feel pretty familiar.
You set a variable
You use the variable
CSS variables follows this same pattern, but the language is slightly different.
What is happening here? F...
React - Memo
Jul 24, 2020
π
6 minutes readπ
ArticleMemoization is used to speed up applications by remembering the results of "expensive" function calls and calculations, so that they don't need to be recalculated again when the inputs have not changed.
For example, if I ask you to calculate the results o...
Hooking into Gatsby's navigation changes
Jul 19, 2020
π
about a minute readπ
ArticleOn my site there is a toggling navigation menu. But when I toggle it open and then click a link it stays open. This is not right - it should close when you change location. Let's fix it using some really simple hooks in a few minutes. First lets see what w...
Running WordPress on Docker
Jul 14, 2020
π
2 minutes readπ
ArticleWordPress runs on a variety of platforms, but last time I was developing I was using a MAMP stack - Mac Apache MySQL & PHP. It's been a while since I was working on WordPress sites and I no longer have MAMP installed on my machine, however I do have Docker...
Create Playwright tests in jest
Jul 2, 2020
π
2 minutes readπ
ArticleThis is a brief guide into setting up Playwright so that it integrates with your existing Jest testing suite. The aim is to get you using Playwright quickly and easily so that you can test the frontend of your web applications. Playwright is an incredibly ...
What are JavaScript closures?
May 28, 2020
π
3 minutes readπ
ArticleClosures are a way to retain a local variable's privacy, but allow it to be accessible in a global scope.
JavaScript has global variables and local variables. Global variables are accessible to everything in your application. Local variables are only acce...
Understanding JavaScript scope
May 18, 2020
π
3 minutes readπ
ArticleScope refers to which functions, variables and objects other functions, variables and objects are able to access when an application is run. It can seem confusing at first, but with a slightly strange example I will try and explain the basics unsing castle...
Working remotely (from home) - COVID enforced
May 1, 2020
π
5 minutes readπ
ArticleCOVID-19 has changed things completely. In a matter of days I have switched from being in an office every day to being at home 24/7. It's not typical WFH, but it does contain a large proportion of the WFH experience. I want to breakdown and understand the ...
Designing a running training plan
Nov 7, 2019
π
5 minutes readπ
ArticleI like to run. I run a lot, and I've found myself running every day of the week with little focus on what I want to achieve. Every day is the same 4-8km with a longer run on a Sunday. It's quite hard to progress myself, and measure my progress when I've be...