Skip to content

Add example demonstrating a simple data-fetching application #12

Open
@sidiousvic

Description

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

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions