Last active
October 16, 2018 06:13
-
-
Save dzenzes/cfa0571b3f8e440f99019ba14f17b6f9 to your computer and use it in GitHub Desktop.
Example code for my blog article
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment