EasyEnv
Engineering/Courses/Catalog/React/Conditional Rendering and Lists
React
IntermediateLesson 6 of 1730 min · hands-on

Conditional Rendering and Lists

Part of the React course

Almost every screen you have ever used shows one thing instead of another depending on some condition: a "you have new messages" banner that only appears when there are new messages, a spinner that only shows while something is loading. And almost every screen shows more than one of something: a list of orders, a grid of products, a feed of posts.

This lesson's folder holds a small Vite project whose main.jsx shows the lesson's component in the browser. Install its packages and start the dev server ...

Want to learn React Conditional Rendering and Lists in a real environment?

Click below, get a fresh Linux box with React ready to go, and work through Conditional Rendering and Lists hands-on with an AI tutor that knows your code.

Start this lessonConditional Rendering and Lists

What you'll learn

  • && for show/hide
  • Ternary for either/or
  • Mapping arrays to JSX
  • The key prop
  • Why keys need to be stable

Read this lesson in your language

All lessons in this course

17 lessons
  1. 1What is React?25 min
  2. 2JSX and Components30 min
  3. 3Props30 min
  4. 4State with useState35 min
  5. 5Handling Events30 min
  6. 6Conditional Rendering and Lists30 min
  7. 7Forms and Controlled Inputs35 min
  8. 8Effects with useEffect40 min
  9. 9Data Fetching40 min
  10. 10Component Composition35 min
  11. 11Context and useContext35 min
  12. 12useReducer35 min
  13. 13Custom Hooks35 min
  14. 14Performance and Memoization35 min
  15. 15Routing with React Router40 min
  16. 16Testing React Components40 min
  17. 17Capstone: Todo App60 min

Explore other courses

Conditional Rendering and Lists - React (English) | Engineering Courses