Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example demonstrating a simple data-fetching application #12

Open
sidiousvic opened this issue Jul 2, 2020 · 2 comments
Open

Add example demonstrating a simple data-fetching application #12

sidiousvic opened this issue Jul 2, 2020 · 2 comments
Assignees
Labels
🎮 examples Related to example apps 🧪 experiment Experimental feature

Comments

@sidiousvic
Copy link
Owner

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. 😈

@sidiousvic sidiousvic added 🎮 examples Related to example apps 🧪 experiment Experimental feature labels Jul 2, 2020
@mussinbenarbia
Copy link
Contributor

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?

@sidiousvic
Copy link
Owner Author

@mussinbenarbia Go ahead! Let me know if you run into a fundamental shortcoming of Phantom 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎮 examples Related to example apps 🧪 experiment Experimental feature
Projects
None yet
Development

No branches or pull requests

3 participants