此组件确实可以工作:
export class Template extends React.Component {
render() {
return (
<div> component </div>
);
}
};
export default Template;
如果我删除最后一行,它就不起作用了。
Uncaught TypeError: Cannot read property 'toUpperCase' of undefined
我想,我不理解es6语法中的一些东西。它不是必须在没有标记"default“的情况下导出吗?
https://stackoverflow.com/questions/31852933
复制相似问题