Skip to content

Instantly share code, notes, and snippets.

@DanielSWolf
Created May 29, 2017 09:27
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 DanielSWolf/d17cebf9ee423cc44978b3b51ab4c3b4 to your computer and use it in GitHub Desktop.
Save DanielSWolf/d17cebf9ee423cc44978b3b51ab4c3b4 to your computer and use it in GitHub Desktop.
esnextbin sketch
<!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>
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')
);
{
"name": "busy-timing-demo",
"version": "0.0.1",
"dependencies": {
"react-dom": "15.5.4",
"react": "15.4.2"
}
}
/*
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