Published on 25 Jul 2023
I was recently working on a project where I needed to make multiple API calls to create a combined array of data. It is very easy to get into a mess with a task like this. For those that find themselves in a similar position, the solution I went with looks like this:
Published on 14 Jun 2023
I’ve been working on a project that uses React Query and I came across a bug caused by the data on the page being reset when coming back to the browser after focusing another window. Upon investigation I discovered that there is a flag enabled by default called
refetchOnWindowFocuswhich does what it says on the tin.
Published on 22 Mar 2023
When I’m working in a codebase I sometimes need to find a previous commit. Until recently I would either do a
git logor view the history in GitHub, but sometimes the commit might be buried under a sea of commits and be difficult to find.
Published on 09 Mar 2023
You may have come across the terms declarative and imperative programming, but aren’t sure what they mean. If you’ve been writing a code for a reasonable amount of time, you most likely know these concepts, you just don’t know what they’re called.
Published on 05 Mar 2023
I’ve been practicing photography seriously for around ten years, and one thing I have always been told is that gear doesn’t matter. One thing I have learned in that time is that this is not an absolute. The gear doesn‘t matter, but it also does.
Published on 09 May 2022
I’ve always been told that when writing a git commit message, it should explain the why rather that the what behind the changes. The reasoning is that a reviewer can see what you have done by looking at the code, but they have no context as to why. My thoughts on this are that it should explain the what, especially if you work with pull requests.
Published on 08 May 2022
The simplest way to set the initial state of a React component is to pass a value directly to the
Published on 05 May 2022
Published on 17 Nov 2021
How many times have you been asked where or what you’d like to be in five years from now? It’s something I’ve been asked in interviews and self-assessments countless times.
Published on 13 Nov 2021