Loading tutorials
useState. You should also know how to attach a handler such as onClick, which the previous chapter covers.2 min readuseState. It also assumes you can already attach a handler such as onClick={handleClick}.2 min readuseState. You have already attached a handler to a DOM element. Now you will pass handlers from one component to another.2 min readuseState. It covers how event handlers change state, why updates are queued, and when to use a functional update.2 min readuseState. You should also know how to attach an onClick or onChange handler.3 min readuseState hook. It also assumes you can attach a handler such as onClick and read the event object.2 min readuseState. You should also know how controlled inputs work: an input gets its value from state and updates that state in onChange. Here you will combine that with preventDefault to handle a whole form.2 min readonClick, read the event object, and write components with props. Here you will learn the path an event takes through nested elements, and which handlers run in which order.3 min readonClick, how to read the event object, and how events bubble up from the target element to its ancestors. Here you will learn how to end that trip early with stopPropagation, when doing so is useful, and what it does not do.2 min readonClick, and use useState. It covers the three event families you will use most, and the properties on each that matter in practice.2 min readuseState. You also need basic TypeScript: type annotations and generics.3 min readonClick, the basics of useState, and how React runs effects after render. Most events need no more than a prop on a JSX element. This chapter covers the cases where that isn't enough.2 min readonClick, know that bubbling and capture describe how an event travels through the DOM, and have used useEffect. It explains where React actually attaches your handlers and what that means when React code and plain DOM code meet.3 min read