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
[x] Create an API example component
[x] (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
[x] The component should display the message from the API in the UI
[x] The component should have a storybook story
[x] 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 your current Kit
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
https://api.starter.dev/hello?greeting=<message>
where the message is "framework-store-style starter.dev!"https://api.starter.dev/graphql
Note:
The mock shows RxJs but that is just because it was created for a different KIT. Use the tool chosen for your current Kit
Mock