Guest User

Untitled

a guest
Oct 16th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. const ListItem = ({ text }) => <li>{text}</li>;
  2.  
  3. const FeatureList = ({ features }) => (
  4. <ul>
  5. {features.map((feature, idx) => (
  6. <ListItem text={feature} key={idx} />
  7. ))}
  8. </ul>
  9. );
  10.  
  11. const features = [
  12. "HTML Template",
  13. "HTML Import",
  14. "Shadow DOM",
  15. "Custom Elements"
  16. ];
  17.  
  18. ReactDOM.render(
  19. <FeatureList features={features} />,
  20. document.getElementById("#root")
  21. );
Add Comment
Please, Sign In to add comment