made with esnextbin
Created
May 29, 2017 09:27
-
-
Save DanielSWolf/d17cebf9ee423cc44978b3b51ab4c3b4 to your computer and use it in GitHub Desktop.
esnextbin sketch
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>ESNextbin Sketch</title> | |
<!-- put additional styles and scripts here --> | |
</head> | |
<body> | |
<div id="root" /> | |
</body> | |
</html> |
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
import ReactDOM from 'react-dom'; | |
import React from 'react'; | |
import { computedAsync } from 'computed-async-mobx'; | |
class Status { | |
observableValue = computedAsync({ | |
init: 'Initial value while loading', | |
fetch: async() {} | |
}); | |
} | |
async function getNextValue() {} | |
function StatusWidget() { | |
return (<ul> | |
<li>Busy: </li> | |
<li>Value: </li> | |
</ul>); | |
} | |
ReactDOM.render( | |
<StatusWidget />, | |
document.getElementById('root') | |
); |
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
{ | |
"name": "busy-timing-demo", | |
"version": "0.0.1", | |
"dependencies": { | |
"react-dom": "15.5.4", | |
"react": "15.4.2" | |
} | |
} |
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
/* | |
unknown: Unexpected token (8:19) | |
6 | observableValue = computedAsync({ | |
7 | init: 'Initial value while loading', | |
> 8 | fetch: async() {} | |
| ^ | |
9 | }); | |
10 | } | |
11 | | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment