import React from 'react';
import ReactDOM from 'react-dom';
const groceryList = (item1, item2, item3) => {
return (
<ul>
<li>{item1}</li>
<li>{item2}</li>
<li>{item3}</li>
</ul>
);
};
ReactDOM.render(
groceryList('Apples', 'Oranges', 'Mangos'),
document.getElementById('root')
);
// going to
import React from 'react';
import ReactDOM from 'react-dom';
const GroceryList = props => {
return(
<ul>
<li>{props.item1}</li>
<li>{props.item2}</li>
<li>{props.item3}</li>
</ul>
);
};
ReactDOM.render(
<GroceryList item1="Apples" item2="Oranges" item3="Mangos" />,
document.getElementById('root')
);
// going to