phantom
phantom copied to clipboard
Add example demonstrating a simple data-fetching application
We need to establish an in-component example to demonstrate how one could do data-fetching with phantom
.
End result could be akin to this rough sketch (using GraphQL
):
async function phantomComponent() {
const usernameQuery = gql`{ data { username } }`
const username = await fetchUsername(query);
return `${Profile(username)}`;
}
}
How async
functions behave with the phantom
engine remains to be seen. ๐
Hello @sidiousvic ๐ Is it ok if I work on this issue? I have an idea! Would it be ok to add a fourth example that has some async fetch calls?
@mussinbenarbia Go ahead! Let me know if you run into a fundamental shortcoming of Phantom ๐