Mocking fetch requests in Storybook
Install fetch-mock:
And then mock your endpoint in your storybook file:
If you are on a version of Storybook older than 5.2, you will need to make use of the storiesOf
API instead:
Install fetch-mock:
And then mock your endpoint in your storybook file:
If you are on a version of Storybook older than 5.2, you will need to make use of the storiesOf
API instead: