This an overview of useRef for those new to React and hooks and assumes a basic understanding of what the DOM is.

useRef is a hook that can be tricky to get to grips with since it’s one that you might only meet once in a blue moon. That’s by design.

But understanding what it is and what it does means gaining a much better understanding of how React works overall, and at the end of the day isn’t that what we all want in our heart of hearts? ❣️

useRef say what!?

Ok I promise this is an article for newer react…

This is an article to demonstrate one use of the useRef hook for those newer to react and hooks.

I’ll be looking at the example from the React docs on how to access a components previous state 👇

I think it’s a good example of what the useRef hook can do and why it’s a great tool to have in the developer tool kit. Plus if React are demoing it, you know it’s legit 😇.

useRef is really powerful because of the fact it creates a good ol’ fashioned javascript object. …

This is an article for those new to React and hooks.

I’ll attempt to break down the goings on of the useReducer hook so that you can feel more comfortable using it. To see it in action in a common example of managing input state for a form visit this other post.

So you’ve gotten to grips with the useState hook and it’s truly wonderful, it is really… but as your applications grow in size you’ve noticed line after line of useState. …

This is a quick and dirty example of how useReducer is a great way for controlling complex state through the example of form inputs.

For those new to React and hooks there comes a point when useState in all it’s glory isn’t the right tool for the job.

For a more detailed look into each part of useReducer see this article. For now I will just be demonstrating how useReducer can be replace multiple useStates with an input form.

Starting with useState

Imagine we have a form component where we want to capture some information from users. …


This is my rambling post about choosing to chase a career in tech coming from a non technical background.

I’ve had lots of jobs which weren’t technical but I love problem solving and helping people. I found the School of Code bootcamp and it changed my life.

I chose to get into coding because it is incredibly rewarding, creative, and can be applied to whatever you can imagine so seems like a good choice to spend most of your time on.

This year of 2020 has been memorable for all, for obvious reasons, but it holds a particular significance…

Earlier this year I made the decision to leap feet first into the world of software development having never coded before.

I was lucky enough to land a place on the School of Code bootcamp. I went from working in healthcare to getting a job as a Software Engineer at Santander in 6 months.

I intend to use this space to put down some reflections about my journey over the year and as a place to talk about software development more generally and technically. Hopefully anyone else who might be considering getting into coding will find something useful in this.

Sam Dent

Adventuring in the world of software development.

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