我有一个简单的组件
footer.component.tsx
import React from 'react';
const Footer: React.FC = (): JSX.Element => {
return <div>CMP Ltd 2020, All rights reserved.</div>;
};
export default Footer;
和footer.stories.ts
import Footer from './footer.component';
export default {
title: 'ButtonComponent'
};
export const primary = () => ({
moduleMetadata: {
imports: []
},
component: Footer
});
每当我运行故事书时,都会出现此错误
Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7BmoduleMetadata%2C%20component%2C%20props%7D&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
我不知道为什么。有想法吗?