Asynchronous code in React-Redux.

Image for post
Image for post

You should understand the basics of Redux before trying to implement a thunk. This is slightly more advanced in the Redux world.

What the heck is a ‘thunk’? There is also an article from their docs here. It just happens to be titled the same way I start this paragraph. Funny that. A simplified explanation is that it’s a wrapper function as a sort of middleware that returns another function. This allows you to execute code before you return the next function (a function that the thunk returns).

Why is this a thing? Redux only allows synchronous actions to be…


The React Redux guides are a bit verbose, to say the least, so I am hoping this quick start guide is simpler.

Image for post
Image for post

If you are familiar with React (you should be if you want to understand this) then you understand the trouble of managing state through multiple components and props in what my instructor called ‘prop drilling’. Redux is a great solution for this single source of truth conundrum; however, class component Redux is a lot. You need to map and then dispatch actions from props and it’s just a bit much for how lazy I want to be. Lucky for us, the beautiful people that write Redux gave us Hooks for our functional component lifestyle.

This is not intended as a…


Tl;dr — Resolutions rarely work. Making a broader them like ‘year of fitness’ where you focus on doing more physical activity allows for more flexibility. Make a theme of how you want to grow for the foreseeable future. Something like ‘year of backend’ or ‘year of challenges’ if you want to work on your backend or coding challenge skills. Yearly themes enable you to consistently work towards a loosely defined goal while adjusting focus as needed, instead of having a strictly defined resolution.

The idea of a yearly theme is not my original idea. It was first shown to me…


Rendering certain routes or pages based on a user’s authentication is important and that’s why I was surprised to see that my googling lead to less than satisfactory results when it comes to authentication guards in React. Sometimes you just need a better understanding (or vocabulary) to harness the powers of the google and React. React router has this example. This is fine. They utilize useAuth. I find it a tad bit hard to follow for a tutorial, however, because it can be even simpler! Here’s how:

state = {    auth: false};

Boom. And we’re done! Congrats!

Image for post
Image for post

Ok, there’s…


I am going to share the journey of how I learned to code in a series and continue to share the journey once I get a job. One thing that is unique about my coding journey is that I am largely self-taught and only later applied to a coding boot camp after a poorly timed pandemic hampered my job hunt. I was introduced to coding through my employer and what was once a whim quickly became a growing passion that would guide many of my future decisions. You should continue reading only if you want to hear about the process…


I started learning Ruby and Rails in Flatiron Coding Bootcamp somewhere around October of 2020; which is approximately two vaccines, one election, and two virus spreading holidays ago in 2020 time. That said when we moved to JavaScript (a language I already knew), I decided to test the waters of this fancy frontend language being reconfigured as a backend in what is called Node.js. I have good news for my fellow students and Rails users, this is going to be easy to learn if you paid attention in Rails school.

Image for post
Image for post
Unfortunately the same is not true for me as I almost always look like the left photo.

Before we get too far, why and what is Node.js…


Representational state transfer (REST) is a convention that is simple and much needed in a community the is built on cooperation. Imagine trying to get gas for your car and the nozzle from the pump was the wrong size or the wrong shape. Getting gas would become a task that causes much grief and headache. Thankfully, the gas people have all agreed that they should work together to make things easier for manufacturers and consumers alike. This is essentially what RESTful architecture does for web services. Standardizing architecture allows consumers to access resources easily and consistently without having to reinvent…


Arguments, should you have them, and when. In Ruby.

Passing in a hash as an argument… passing key-value pairs as an argument. Setting the default argument to a hash. Using hashes as default arguments?

I recently started my journey at Flatiron coding boot camp on the fifth of October and I have loved every moment of it. That’s when the trouble with arguments began and I had to take action. …

Jacob Short

Software, skateboards, and seeing the world.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store