【发布时间】:2019-01-14 18:15:39
【问题描述】:
我正在尝试将语义 UI 用于 React 及其模态。
下拉是好的,但无法加载模式:
import {DropDown} from "semantic-ui-react";
import {Modal} from "semantic-ui-react";
export default class Builder extends Component {
render(){
return(
<DropDown/>
<Modal/>
)
}
}
控制台返回此错误:
app.js:547 Warning: React.createElement: type is invalid -- expected a string
(for built-in components) or a class/function (for composite components) but got: undefined
You likely forgot to export your component from the file it's defined in.
Check the render method of `Portal`.
我已经尝试过这样的:
import Modal from "semantic-ui-react";
正如我所见,Modal 文件夹与我的包中的下拉菜单处于同一级别。 欢迎任何帮助!
谢谢
【问题讨论】:
标签: reactjs semantic-ui semantic-ui-react