A free, self-paced textbook in 6 chapters. Read a chapter, then drill it with the 50 companion flashcards using spaced repetition.
React is a JavaScript library developed by Facebook for building user interfaces. At its core, React is component-based: an application is composed of small, reusable pieces of UI...
Components are the building blocks of a React application. A functional component is a plain JavaScript function that accepts an object of inputs called props and returns JSX. A cl...
Hooks are functions that let functional components use state, side effects, contexts, and other React features without writing classes. useState returns a [value, setter] pair used...
Props are great for passing data, but threading the same value through several layers of components that don't actually use it is the problem known as prop drilling. The Context AP...
Conditional rendering is how React shows different UI based on state or props. The most common idioms are the ternary expression {isLoggedIn ? <Dashboard /> : <Login />...
Rendering lists in React is just mapping over an array to produce elements, but each element needs a stable key prop. Keys give every list item a stable identity so React can effic...