Skip to content

[Bug]: "Implicit actions can not be used" error when defining argTypes with on without handler in doc file #33758

@gretchelin

Description

@gretchelin

Describe the bug

Story is throwing Implicit actions can not be used during rendering error when I have argTypes for events (defined in argTypes prop of the story as in this example onBlabla), which event is emitted during component initialization lifecycle (in this case is in onMounted).

This issue is only fixed if I also defined onBlabla: () => {} under args prop in the story file.

I have found no way to disable interaction feature, as passing the config mention here: https://storybook.js.org/docs/api/doc-blocks/doc-block-story#autoplay does not fix the issue.

Since I didn't use interaction feature, I do not expect Storybook to complain to the point it refuse to render story in documentation page. Maybe a warning saying that interaction is not "tracked" or something is better instead of blocking rendering?

Reproduction link

https://repro-storybook-implicit-action.vercel.app/

Reproduction steps

  1. Go to above Link
  2. Click SampleError documentation
  3. There'll be error message related to implicit actions
  4. Click SampleFixed documentation
  5. No error in that story because handler is defined explicitly

System

System:
    OS: Linux 6.6 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-12650H
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 24.5.0 - ~/.nvm/versions/node/v24.5.0/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v24.5.0/bin/yarn
    npm: 11.5.1 - ~/.nvm/versions/node/v24.5.0/bin/npm
    pnpm: 10.18.0 - ~/.nvm/versions/node/v24.5.0/bin/pnpm <----- active
  npmPackages:
    @storybook/addon-docs: ^9.1.13 => 9.1.13
    @storybook/addon-links: ^9.1.13 => 9.1.13
    @storybook/builder-vite: ^9.1.13 => 9.1.13
    @storybook/vue3-vite: ^9.1.13 => 9.1.13
    eslint-plugin-storybook: ^9.1.13 => 9.1.13
    storybook: ^9.1.13 => 9.1.13

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions