Giter Club home page Giter Club logo

Comments (12)

jonniebigodes avatar jonniebigodes commented on June 3, 2024 10

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.

fooloomanzoo avatar fooloomanzoo commented on June 3, 2024 4

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.

nutboltu avatar nutboltu commented on June 3, 2024 3

I haven't tried v7. I might need sometime to investigate further on v7

from storybook-addon-mock.

danmaz74 avatar danmaz74 commented on June 3, 2024 3

Still an issue...

from storybook-addon-mock.

nutboltu avatar nutboltu commented on June 3, 2024 3

👋🏾 @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.

mikestu avatar mikestu commented on June 3, 2024 1

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.

mikestu avatar mikestu commented on June 3, 2024

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.

mikestu avatar mikestu commented on June 3, 2024

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:

image

from storybook-addon-mock.

mikestu avatar mikestu commented on June 3, 2024

Any update on this one? Thanks!

from storybook-addon-mock.

Cayan avatar Cayan commented on June 3, 2024

Looking forward for v7 support

from storybook-addon-mock.

stoneqq11 avatar stoneqq11 commented on June 3, 2024

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.

terrymun avatar terrymun commented on June 3, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.