Loading tutorials
useState, and how to pass functions as props. It covers the first state-sharing technique in React and where it stops working.2 min readuseState, and how to pass functions as props. It covers the render props pattern: what it is, how to use it, and where it goes wrong.2 min readuseState, and how to pass functions as props. You should also be comfortable with ES modules and destructuring.2 min readuseState and useEffect, and event handlers. It shows how to pull stateful logic out of a component so several components can reuse it.2 min readuseState, and passing functions as props. It covers the Context API, which later chapters use to build compound components.2 min readuseState, and passing functions as props. It also assumes you have read the earlier chapters on composition and lifting state up. Context comes in the next chapter, so here the focus is on what a compound component is and why you would buil2 min readuseState, and passing props and event handlers. It also assumes you have seen createContext and useContext in the previous chapter. Here you will combine them to build a Tabs compound component.2 min readuseState, and the Context API basics from the previous chapter. It covers two details of compound components: how subcomponents are attached to the parent, and how to fail clearly when they are used in the wrong place.2 min readchildren works. It covers passing elements through named props so a parent can place content in specific regions of a component.2 min readuseState, and passing callbacks as props. It covers how one component can support two ways of owning its state.2 min readTabs pattern with context and the controlled versus uncontrolled distinction. Here you combine them. The compound component keeps working on its own, and a parent can take over its state when needed.2 min readuseState or useReducer, spread props in JSX, and pass event handlers. You should also know why onClick on a custom component needs care.2 min readuseState, have met useReducer, and have read the earlier chapters on custom hooks and prop getters. The state reducer pattern lets a hook's consumer change how its state transitions work, without the hook adding a new prop for every case.2 min readuseState, useReducer, and the custom hook and prop getter patterns from earlier chapters. It shows how those pieces combine into headless components and hooks.2 min readuseState, context, and the patterns from earlier chapters: render props, higher-order components, custom hooks, compound components, control props, prop getters, and the state reducer. Here you will pick between them for a real problem.2 min read