Skip to content

"React.createElement: type is invalid" after upgrading to 5.0 #144

@nlfiedler

Description

@nlfiedler

Code works fine with version 4.1.3, but raises an error in 5.0:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of `ThumbnailImage`.
    in ThumbnailImage (created by ThumbnailColumn)
    in div (created by ThumbnailColumn)
    in div (created by Box)
    in Box (created by withHelpersModifiers(Box))
    in withHelpersModifiers(Box) (created by ThumbnailColumn)
    in div (created by ThumbnailColumn)
    in ThumbnailColumn (created by Connect(ThumbnailColumn))
    in Connect(ThumbnailColumn) (created by AssetPage)
    in div (created by AssetPage)
    in div (created by AssetPage)
    in AssetPage (created by Route)
    in Route (created by App)
    in div (created by App)
    in Router (created by ConnectedRouter)
    in ConnectedRouter (created by App)
    in App
    in Provider

Using Electron 1.8.8 (Node.js v8.2.1), react(-dom) 16.6.3. Code looks like this:

    const figure = (<div>hello</div>)
    return React.createElement(VisibilitySensor, {
      onChange: this.onVisibilityChange,
      partialVisibility: true
    }, figure)

I substituted the example from the README, but that didn't make a difference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions