Skip to content

Instantly share code, notes, and snippets.

@bjyoungblood
Created February 24, 2015 23:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjyoungblood/ca5780b9eb983d52b830 to your computer and use it in GitHub Desktop.
Save bjyoungblood/ca5780b9eb983d52b830 to your computer and use it in GitHub Desktop.
render() {
let body = this.state.smarthome.when({
pending : () => { return <div>Loading...</div>; },
failed : () => { return <div>Error loading smarthome</div>; },
done : (smarthome) => { return <SmarthomeEventsView smarthome={smarthome} />; },
});
return (
<div>
<h1>Smarthome! :D</h1>
{body}
</div>
);
}
@jwdotjs
Copy link

jwdotjs commented Feb 24, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment