Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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