Vigyata.AI
Is this your channel?

React 19 Tutorials - 17 - Introduction to State

6.9K views· 187 likes· 6:38· Nov 24, 2025

🛍️ Products Mentioned (2)

Github - https://github.com/gopinav/React-19-Tutorials Become a Fullstack Developer with Scrimba - https://scrimba.com/fullstack-path-c0fullstack?via=Codevolution Follow me + Twitter - https://twitter.com/CodevolutionWeb Business - codevolution.business@gmail.com State in React 19

About This Video

In this lesson, I introduce one of the most important ideas in React: state. Up to this point, we’ve learned a lot—components, props, conditional rendering, lists, events, and even child-to-parent communication. But there’s still one big limitation if we only use regular variables: we can’t actually update what’s on the screen. I demonstrate this with a simple counter component where a button click increments a local `count` variable and logs the updated value to the console, but the UI stubbornly stays at `Count: 0`. Then I break down why that happens. React renders the component once, and changing a local variable doesn’t tell React to render again. And even if a rerender did happen, the value would reset because the component runs top to bottom on every render—so `let count = 0` starts fresh each time. That’s where state comes in. State is the component’s memory: when it changes, React rerenders, and the value persists between renders. I also clarify the difference between props and state—props come from the outside and you don’t change them, while state belongs to the component. In the next video, we’ll fix the broken counter using the `useState` hook.

Frequently Asked Questions

🎬 More from Codevolution