React.createElement: type should not be null, undefined, boolean, or number

    xiaoxiao2023-03-24  3

    原因是你通过

    import {xxx} from 'xxx'

    这个方法引入了一个export default的对象作为react组件。 对于export default的对象,你应该直接引入,通过以下方法。

    import xxx from 'xxx'

    有可能有其它情况,总的来说是你的组件发生了错误,一般错误是引入时发生的。 参考: https://codereviewvideos.com/blog/warning-react-createelement/

    转载请注明原文地址: https://ju.6miu.com/read-1201216.html
    最新回复(0)