Skip to content

Instantly share code, notes, and snippets.

View chrispouliot's full-sized avatar

Chris Pouliot chrispouliot

View GitHub Profile

Keybase proof

I hereby claim:

  • I am moxuz on github.
  • I am moxuz (https://keybase.io/moxuz) on keybase.
  • I have a public key whose fingerprint is 9BE1 24BE 5B21 5AFA 8F8C D382 A231 D81F BD20 E3D2

To claim this, I am signing this object:

async function getData() {
...
let data = []
for (let url of apiUrls) {
data.push(await request(url))
}
return data
}
async function getData() {
const apiUrls = [
"api.data.com/posts",
"api.data.com/users",
...
]
let data = []
async function loadPosts() {
try {
//Blocking
let postData = await request("https://jsonplaceholder.typicode.com/posts")
let posts = JSON.parse(postData)
let firstPost = posts[0]
//Blocking
let userPosts = await request(`https://jsonplaceholder.typicode.com/posts?userId=${firstPost.userId}`))
function loadPosts() {
request("https://jsonplaceholder.typicode.com/posts")
.then(data => {
let postData = JSON.parse(data)
let firstPost = postData[0]
return request(`https://jsonplaceholder.typicode.com/posts?userId=${firstPost.userId}`)
})
.then(data => {
doSomething(data)
})
And the important thing to remember is that this simulation is a good one.
It's believable, it's tactile. You can reach out -- things are solid.
You can move objects from one area to another. You can feel your body.
You can say, "I'd like to go over to this location," and you can move this mass of molecules through the air over to another location, at will.