我跟随this tutorial做一个服务器端渲染Web应用程序,但是当我尝试实现React-Router时,出现以下错误
Error: Element 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, or you might have mixed up default and named imports.
我一直在寻找解决方案,但似乎找不到解决方案,任何可能的输入都会很棒。
谢谢
答案 0 :(得分:0)
发现问题出在进口中,必须按如下所述进行进口
import Button from 'react-bootstrap/Button'
import Form from 'react-bootstrap/Form'
也是将引导文件加载到引导文件的标准