Props

Props
👨‍💼 You are the commander of your component's API. The API for your component is "props" which is the object your component function accepts as an argument.
So now, we're going to use a Calculator component that can display an equation and its solution, like so:
element = <Calculator left={1} operator="+" right={2} />
// should render:
// <div>
//   <code>
//     1 + 2 = <output>3</output>
//   </code>
// </div>
Let's get some more practice with custom components.

Please set the playground first

Loading "Props"
Loading "Props"