Loading tutorials
children prop, the main tool for that. The later chapters (compound components, render props, control props) all build on it.4 min readuseState, pass functions as props, and read basic ES module syntax. It covers how to share state between sibling components by moving it to their closest common parent. It also covers the points where that approach starts to hurt, which i5 min readuseState and useEffect, and pass functions as props. A render prop is a prop whose value is a function that returns React elements. The component calls that function instead of deciding by itself what to draw. The component owns the log4 min readuseState and useEffect, passing functions as props, and basic ES module syntax. It also assumes you have seen render props, which solve a similar problem.4 min readuseState and useEffect well enough to read them. It also assumes you pass functions as props and use destructuring and ES modules.4 min readuseState, and pass functions as props. It covers the Context API: what it does, how React resolves it, and the mistakes that cause bugs and extra renders. Later chapters build compound components on top of it.4 min readuseState, and passing functions as props. You should also be comfortable with ES modules and destructuring. Here you build a Tabs compound component whose parts share state through context. By the end you will know how the pieces fit4 min readuseState and useContext. It also assumes you have seen the Tabs example from the previous chapter, where Tabs shares its selected value through context. Here you will look at two details that decide whether a compound component is 4 min readchildren prop, and that you have seen composition with children earlier in this tutorial.4 min readuseState, pass functions as props, and handle events. You should also know why state is sometimes lifted into a parent, which the earlier chapter on lifting state covers.5 min readTabs compound component built earlier with context, and that you know the difference between controlled and uncontrolled inputs. You should also be comfortable with useState and passing callbacks as props.4 min readTabs component from the earlier chapters. You should also know what aria-* attributes are and how onKeyDown works. The goal is to make the compound component usable with a keyboard and a screen reader, without taking layout control away from4 min readuseState, pass event handlers as props, and use object spread and destructuring. It builds on the custom hooks chapter. It also leads into the state reducer chapter that follows.4 min readuseState, and the basics of useReducer. You should also have seen a custom hook that returns state and handlers. Here you will learn how a hook can let its callers change how its state updates, without forking the hook.6 min readchildren, lifting state, render props, higher-order components (HOCs), custom hooks, context, compound components, controlled and uncontrolled modes, control props, prop getters, the state reducer, and headl5 min read