Created
May 29, 2016 21:23
-
-
Save didierfranc/2e8d5938cbafbd276ec26d79fb966730 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Spinner = () => ( | |
<p>Loading ...</p> | |
) | |
const List = ({items}) => ( | |
<ul> | |
{items.maps((item, i) => <li key={i}>{item.text}</li>)} | |
</ul> | |
) | |
const Element = (props) => ( | |
props.loaded ? <List {...props}/> : <Spinner /> | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment