Skip to content

Instantly share code, notes, and snippets.

@JozefFlakus
Last active February 1, 2020 22:28
Show Gist options
  • Save JozefFlakus/4a9cd152e4b1a46e56653754bddc28b9 to your computer and use it in GitHub Desktop.
Save JozefFlakus/4a9cd152e4b1a46e56653754bddc28b9 to your computer and use it in GitHub Desktop.
Marble.js 3.0 - async readers
bindEagerlyTo(Token)(async () => 'bar');
const foo = useContext(Token)(ask); // foo === 'bar'
// but...
bindTo(Token)(async () => 'bar');
const foo = useContext(Token)(ask); // foo === Promise<'bar'>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment