如何解决故事书CRA打字稿中发生钩子调用
我遵循了CRA故事书设置。
npx create-react-add my-app --template typescript
npx -p @storybook/cli sb init
yarn storybook
但是遇到这个错误。
Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks............blah blah
and
The above error occurred in the <ManagerConsumer> component:
in ManagerConsumer
in Unknown (created by Layout)
in div..........
出什么问题了?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。