Skip to content

Instantly share code, notes, and snippets.

@quangbuule
Created March 9, 2015 10:11
Show Gist options
  • Save quangbuule/7f27c8fe94f05ee8909f to your computer and use it in GitHub Desktop.
Save quangbuule/7f27c8fe94f05ee8909f to your computer and use it in GitHub Desktop.
import when from 'store-util/when';
import { Spinner, Campaign } from 'components';
[...]
render() {
var campaign = this.state.campaign;
return (
<div>
{when(campaign, {
retrieving: <Spinner />,
done: <Campaign {...{campaign}} />
})}
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment