ArrayKnight / storybook-addon-headless

A Storybook addon to preview content from a headless CMS in components
https://storybook-addon-headless.netlify.com/
MIT License
29 stars 4 forks source link

Question: rest api data on components #17

Closed Karnith closed 4 years ago

Karnith commented 4 years ago

Hi, I have a quick question. Can this module be used as a trigger action for components like buttons? What I'm trying to do is use storybook as a quasi visual api test bed for back end api without current front end. Later it will be used for component documentation.

ArrayKnight commented 4 years ago

No, there's currently no way for the story component to trigger an API call. You can however utilize the autoFetchOnInit parameter to make the API call automatically on story load.

I would suggest looking into Swagger for purely API documentation with the ability to run test queries