Loading tutorials
map converts an array of data into an array of React elements, and what React does with that result. It assumes you know basic JavaScript (arrays, objects, arrow functions, map and filter), basic React (function components, props, JSX), and the useState hook.5 min readmap. It also assumes you can write a React function component with props and JSX. You do not need useState here. The data in this chapter is fixed.4 min readmap, React function components, props, JSX, and the useState hook. You should also have rendered a basic list with map. Here you will learn what a key is, what React does with it, and which bugs appear when keys are missing or wrong.5 min readuseState, and call map on an array to render a list. You have already seen that each list item needs a key. Here you will learn how to choose it. The choice looks minor, but a wrong key can make a list show the wrong data 6 min readmap and useState, and that you have seen the key prop on list items. You will move the markup for one list item into its own component and see where the key goes afterward. You will also see how ext5 min readmap, you know why list items need a key, and you have used function components, props, and useState. Here you will learn what to do when each list item must produce more than one sibling element, and why the short Fragment syntax cannot carry a k5 min readmap and filter methods. It also assumes you can write function components with props and use useState. By the end you will be able to derive a filtered, sorted view of your data for display, and you will know why that view must never chan4 min readuseState hook. Here you will learn the most basic way to decide what a component shows: plain if statements and ea5 min readuseState hook. You should also have read the previous chapter on if statements and early returns. Here you will learn when a ternary is the right tool, how to write one that stays readable, and 5 min read&& operator as a way to show or hide part of a component. It explains why && can print a stray 0 on screen and how to prevent that. It assumes you know JavaScript truthiness, function components, props, JSX expressions, and the earlier chapters on if and the ternary o5 min readuseState and have seen if, ternary, and && used for conditional rendering in JSX. Here you will learn exactly what React draws for null and the other "empty" values. You will also learn how a comp5 min readmap, filter, and useState. It also assumes you know how keys work in a rendered list. It covers what to show when a list has no items, and how to tell the different kinds of "nothing to show" apart.5 min readuseState when you add, remove, or change items. It assumes you know JavaScript arrays and objects, the map and filter methods, function components, props, JSX, and the basics of useState. It builds on the earlier chapters on rendering 5 min readuseState. It also assumes you have read the earlier chapters on list keys. There, a key told React which array item was which. Here you use the same mechanism outside of lists, to tell React that a component is a different instance5 min read