首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >反应故事簿无法呈现一个故事

反应故事簿无法呈现一个故事
EN

Stack Overflow用户
提问于 2022-07-21 11:41:25
回答 1查看 442关注 0票数 0

我试图创建一个包含主题的故事书文件夹的文档。但是得到这个错误:

代码语言:javascript
复制
Uncaught Error: Unable to render story ... as the component annotation is missing from the default export

Migration.stories.mdx

代码语言:javascript
复制
import { Meta, Story} from '@storybook/addon-docs';

<Meta title="Documentation / Visual Update Migration" />

# Migrating

<Story name="Card" />

## Card

-   Text
-   Text

<Story name="Container" />

## Container

-   Text
-   Text

所有这些原因的故事标记,但如果我删除它们,将不会有参考在侧边栏

预期

因此,路径和侧栏正确加载,但单击时的内容不会加载错误。

代码语言:javascript
复制
Uncaught Error: Unable to render story documentation-visual-update-migration--card as the component annotation is missing from the default export ...
Uncaught Error: Unable to render story documentation-visual-update-migration--container as the component annotation is missing from the default export ...

加号

代码语言:javascript
复制
2 The above error occurred in the <storyFn> component ...

代码语言:javascript
复制
POST http://localhost:6006/runtime-error 404 (Not Found)
POST http://localhost:6006/runtime-error 404 (Not Found)
EN

回答 1

Stack Overflow用户

发布于 2022-07-22 08:29:49

问题出在<Story ... />Story想要里面的东西。

Fix: <Story ...>{''}</Story>

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73065537

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档