You're probably putting everything in useState — and it's causing unnecessary re-renders. Here's the one rule that tells you when to use useRef vs useState.
In this video, I break down the real difference between useRef and useState in React with two simple demos. No fluff, just the mental model you need.
== What you'll learn ==
The core difference: re-renders vs silent updates
A click counter demo showing both hooks side by side
A real-world timer example (why useRef wins here)
The one question that decides which hook to use
== The Rule ==
"Does changing this value need to update what the user sees? useState. Everything else? useRef."
== Links ==
React useRef docs: https://react.dev/reference/react/useRef
React useState docs: https://react.dev/reference/react/use...
== About ==
I'm Gabe — a full-stack MERN developer making practical videos about React, JavaScript, and building real apps. No hype, just code.
#react #javascript #webdev #useref #usestate #reacthooks