Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 1.14 KB

File metadata and controls

23 lines (16 loc) · 1.14 KB

Background

We want to launch each kit with an example of a component that fetches data from a data source and related tests. We have an endpoint set up as a simple hello world that accepts a greeting for example sake.

Acceptance

  • Create an API example component
  • (if using REST)The component should make a GET request to https://api.starter.dev/hello?greeting=<message> where the message is "framework-store-style starter.dev!"
  • (if using GraphQL) above equivalent using endpoint https://api.starter.dev/graphql
  • When it successfully retrieves data the component should display the message from the API in the UI
  • The message should be customizable
  • When loading, display a loading state
  • When an error occurs, display an error state
  • The component should have a Storybook story
  • The component should have a set of reasonable tests demonstrating how to mock APIs

Note:

The mock shows RxJs but that is just because it was created for a different KIT. Use the tool chosen for you current Kit

Mock

image