Course
summary


    0 chapters available

Loading...

Create a modern web application with React

Difficulty: Junior ● Progress: 0 / 0 modules completed

Passing data between components

In the previous module, we saw how to display data from our JavaScript, in our JSX. But now, we're going to discover how to send information from one component to another.

This information is called props (for “properties”).

To pass a prop to a component, we simply pass it an attribute, just like in HTML:

function App() {
  return (
    <div>
      <HelloWorld msg="Hello" />
      <HelloWorld msg="Bye" />
    </div>
  )
}

You need to purchase this course to read this module!

Or !