June 2021
Intermediate to advanced
398 pages
9h 35m
English
Now that we have a component for each seat, we want to combine multiple seats into a row and then combine multiple rows into a venue. Invoking a component from another component normally involves a JSX call that looks as though the component was an HTML tag with the name of the component first and the props following with the same syntax used to write HTML attributes.
So if we want to use our Seat component, we’d call it with syntax like <Seat seatNumber={seatNumber} />. The first part of the tag is our component name, and then we assign the prop as if it were an HTML attribute using the curly bracket notation to send the value of the seat number. If the value being sent is a string, you can use a string literal rather ...