Skip to content

Instantly share code, notes, and snippets.

@ryanflorence
Created November 19, 2018 14:54
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanflorence/7c664baf62c5dd57000c7f129a4a9ffd to your computer and use it in GitHub Desktop.
Save ryanflorence/7c664baf62c5dd57000c7f129a4a9ffd to your computer and use it in GitHub Desktop.
// sequential
function App() {
let one = Resource.read('1')
let two = Resource.read('2')
let three = Resource.read('3')
return (
<div>
<div>{one}</div>
<div>{two}</div>
<div>{three}</div>
</div>
)
}
// parallel
function App() {
return (
<div>
<One/>
<Two/>
<Three/>
</div>
)
}
function One() {
let one = Resource.read('1')
return <div>{one}</div>
}
function Two() {
let two = Resource.read('2')
return <div>{two}</div>
}
function Three() {
let three = Resource.read('3')
return <div>{three}</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment