Loading tutorials
const stops reassignment but not mutation. You need a running React project, for example 6 min readuseState for simple values. It also assumes you know basic JavaScript closures and arrow functions. Earlier chapters covered how data flows down from parent to child. This chapter covers the reverse: how a child tells its 5 min readuseState at a basic level, and pass props with JSX attributes. It also assumes you know that a state setter triggers a re-render. The goal is a working rule for deciding where each piece of data lives.5 min readTextInput and a DOM element like input. You don't need TypeScript until the typing section.5 min readkey and ref. It assumes you can write function components, pass and destructure props, and use useState. It also assumes you have run a React project, for example one created with Vite. Examples use React 19 a6 min readchildren prop. It also assumes you know that JSX elements and functions are ordinary values you can pass as props. Earlier chapters cover those topics. Here you will use them to build components whose layout or 5 min readchildren. You should also know that state lives in a component and that a parent owns the state it passes down. This chapter covers what happens when data must travel through many layers. It also5 min readuseState. It also assumes you know that a callback prop is a function passed down from a parent. It covers when a component re-renders, what changes in its props can and cannot prevent, and how memo compares props.5 min read