Comments (12)
Hey @nutboltu! I'm one of the Storybook maintainers. I focus primarily on the documentation and community outreach. I'm reaching out to you to get a bit of information regarding your future plans for the addon, and if you need any help from us with regards to any documentation changes or other changes that you might consider relevant, more even as it seems, there's interest in providing support for the upcoming 7.0 release, per the comments in this issue. To help you with this, we've prepared an abridged guide for the required changes here, and if you have any questions or issues, please reach out to us in the #prerelease channel in our Discord Server.
Looking forward to hearing from you.
Hope you have a fantastic day.
Stay safe
from storybook-addon-mock.
I created a PR for Storybook v7 #157
There has been a couple of setup and integration steps and also exports changes in Storybook v7
from storybook-addon-mock.
I haven't tried v7. I might need sometime to investigate further on v7
from storybook-addon-mock.
Still an issue...
from storybook-addon-mock.
👋🏾 @everyone we have released version 4.0.0 which supports Storybook v7. A huge shout out to @fooloomanzoo for taking all the hardship to make it happen.
from storybook-addon-mock.
For those that are waiting on this to support v7, another option is to use Mock Service Worker (Storybook addon). I have switched my project to it, and it went well so far. I won't close this though, as I'm sure others will need v7 here.
from storybook-addon-mock.
Just fyi - Storybook 7 just hit beta today. If they happened to change something which could make your add-on now work, I will let you know... just not sure when I will get the chance to try it out just yet.
from storybook-addon-mock.
I tried out the latest beta.1 version they have, and get similar results. It looks like they removed or changed a couple of things the add-on uses. I don't have a repo with an example, but if it helps, here's a screenshot of the two errors:
from storybook-addon-mock.
Any update on this one? Thanks!
from storybook-addon-mock.
Looking forward for v7 support
from storybook-addon-mock.
use v4.0.0 with storybook v7,when add empty mockAddonConfigs to preivew.js,throw error:
mockAddonConfigs: {}
TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
at _iterableToArray (http://localhost:6006/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_mjs-node_modules_storybo-3abf76.iframe.bundle.js:70736:76)
at _toConsumableArray (http://localhost:6006/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_mjs-node_modules_storybo-3abf76.iframe.bundle.js:70733:70)
at withRoundTrip (http://localhost:6006/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_mjs-node_modules_storybo-3abf76.iframe.bundle.js:70758:24)
at hookified (http://localhost:6006/sb-preview/runtime.js:7:17241)
at http://localhost:6006/sb-preview/runtime.js:34:1451
at http://localhost:6006/sb-preview/runtime.js:34:1912
at withOutline (http://localhost:6006/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_mjs-node_modules_storybo-3abf76.iframe.bundle.js:1120:669)
at hookified (http://localhost:6006/sb-preview/runtime.js:7:17241)
at http://localhost:6006/sb-preview/runtime.js:34:1451
at http://localhost:6006/sb-preview/runtime.js:34:1912
if add some config,then throw another error:
mockAddonConfigs: {
refreshStoryOnUpdate: true
}
Uncaught Error: Rendered fewer hooks than expected. This may be caused by an accidental early return statement.
at renderWithHooks (chunk-PUVLCKJJ.js:69:1937)
at updateFunctionComponent (chunk-PUVLCKJJ.js:69:48263)
at beginWork (chunk-PUVLCKJJ.js:71:21338)
at HTMLUnknownElement.callCallback2 (chunk-PUVLCKJJ.js:2:1921)
at Object.invokeGuardedCallbackDev (chunk-PUVLCKJJ.js:2:2445)
at invokeGuardedCallback (chunk-PUVLCKJJ.js:2:3703)
at beginWork$1 (chunk-PUVLCKJJ.js:90:39484)
at performUnitOfWork (chunk-PUVLCKJJ.js:90:21018)
at workLoopSync (chunk-PUVLCKJJ.js:90:20642)
at performSyncWorkOnRoot (chunk-PUVLCKJJ.js:90:13607)
from storybook-addon-mock.
@stoneqq11 Ran into the same issue, but it seems like you just need to add an empty array, i.e.:
mockAddonConfigs: {
globalMockData: [],
refreshStoryOnUpdate: true,
}
from storybook-addon-mock.
Related Issues (20)
- URL params order shouldn't matter
- [Feature] Should be able to abort fetch requests HOT 1
- XMLHttpRequest is not properly reflected when there's no mock matched HOT 12
- Scope mockData to each story
- Addon fails in Yarn pnp projects HOT 3
- getting blank pages when navigating around storybook after adding the mock addon HOT 3
- `forEach` and other properties missing from response headers HOT 3
- Not properly mocking requests made with ofetch HOT 2
- Undeclared dependency on `prop-types` HOT 1
- No apparent way to mock NextJs internal API calls
- panel content not scrollable HOT 3
- Support string responses
- Unable to `ignoreQueryParams` per request basis HOT 1
- Disabling the addon for specific story causes an error
- Problem with mocking N requests of one type [GET]. HOT 1
- Enabling this addon interferes with `vue-advanced-cropper`
- Storybook 8 compatibility HOT 13
- Mocking SVG Get Request
- error after updating to storybook 8
- Support for differentiating URL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storybook-addon-mock.