Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const ListItem = ({ text }) => <li>{text}</li>;
- const FeatureList = ({ features }) => (
- <ul>
- {features.map((feature, idx) => (
- <ListItem text={feature} key={idx} />
- ))}
- </ul>
- );
- const features = [
- "HTML Template",
- "HTML Import",
- "Shadow DOM",
- "Custom Elements"
- ];
- ReactDOM.render(
- <FeatureList features={features} />,
- document.getElementById("#root")
- );
Add Comment
Please, Sign In to add comment