{"id":21095480,"url":"https://github.com/faebeee/storybook-axios","last_synced_at":"2025-10-19T07:37:30.656Z","repository":{"id":43492423,"uuid":"328025385","full_name":"faebeee/storybook-axios","owner":"faebeee","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-28T12:06:15.000Z","size":17249,"stargazers_count":10,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T20:51:43.767Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://faebeee.github.io/storybook-axios/index.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/faebeee.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-08T22:23:43.000Z","updated_at":"2024-02-20T17:03:54.000Z","dependencies_parsed_at":"2024-06-19T01:48:00.901Z","dependency_job_id":"17172220-b4a8-472b-96b6-83c246fcf1ed","html_url":"https://github.com/faebeee/storybook-axios","commit_stats":{"total_commits":37,"total_committers":3,"mean_commits":"12.333333333333334","dds":0.05405405405405406,"last_synced_commit":"f10c10b388dd7e977617575dfd2905fa4706f9d2"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faebeee%2Fstorybook-axios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faebeee%2Fstorybook-axios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faebeee%2Fstorybook-axios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faebeee%2Fstorybook-axios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faebeee","download_url":"https://codeload.github.com/faebeee/storybook-axios/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254547141,"owners_count":22089269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T22:26:34.017Z","updated_at":"2025-10-19T07:37:30.550Z","avatar_url":"https://github.com/faebeee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# storybook-axios\n\n![Logo](./doc/storybook-axios.png)\n\nStorybook addon to inspect axios network requests.\n\n![UI ](./doc/ui.png)\n\n## Demo\n[Check out the demo](https://faebeee.github.io/storybook-axios/index.html)\n\n## Tech\nCreated using [React](https://www.npmjs.com/package/react), [axios](https://www.npmjs.com/package/axios) and [antd](https://www.npmjs.com/package/antd)\n\n## Installation\n\n`npm install storybook-axios`\n   \n\n## Configure\n\nAdd addon  \"storybook-axios\" in `.storybook/main.js`\n\n```js\nmodule.exports = {\n    stories: [\n        '../srcv2/**/*.stories.mdx',\n        '../srcv2/**/*.stories.@(js|jsx|ts|tsx)',\n    ],\n    addons: [\n        '@storybook/addon-essentials',\n        '@storybook/addon-notes/register',\n        '@storybook/addon-a11y',\n        '@whitespace/storybook-addon-html',\n        'storybook-axios/register'\n    ],\n```\n\nadd a decorator in `.storybook/preview.js` and pass in the `axios` instance which is used in your app.\n\n```js\nimport withAxiosDecorator from 'storybook-axios';\nimport { getAxios } from '../utils/get-axios';\n\nexport const parameters = {\n    actions: { argTypesRegex: \"^on[A-Z].*\" },\n}\n\nexport const decorators = [withAxiosDecorator(getAxios())];\n\n```\n\n__Note__ best way is to have an axios helper library, which creates a single instance and reuses it everywhere in the app.\nThe decorator adds interceptors to that axios instance in order to listen for network requests.\n\n\n## Example\n![UI ](./doc/ui.gif)\n\n## Todos\n\n[x] Make it work with FormData\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaebeee%2Fstorybook-axios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaebeee%2Fstorybook-axios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaebeee%2Fstorybook-axios/lists"}