Skip to content

Update docs for commonjs import patterns #1090

Open
@ghost

Description

Case

I updated package deps from v0.16.0 to v0.17.0, v0.17.1 and v0.17.2 which all are fine.
But got errors from the version v0.17.3 up to the latest v0.17.5 on React.createElement:

  const reactElement = React.createElement(GraphiQL, {
    query: currentQuerySource || kDefaultQuery,
    fetcher: fetcher,
    variables: '',
    response: '',
    onEditQuery: onEditQuery,
    onEditVariables: onEditVariables,
  })

Kindly please advise. Thanks.

Details

build.js:84381 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
warningWithoutStack @ build.js:84381
build.js:82442 Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
    at createFiberFromTypeAndProps (build.js:82442)
    at createFiberFromElement (build.js:82465)
    at reconcileSingleElement (build.js:71339)
    at reconcileChildFibers (build.js:71399)
    at reconcileChildren (build.js:73909)
    at updateHostRoot (build.js:74380)
    at beginWork$1 (build.js:76003)
    at HTMLUnknownElement.callCallback (build.js:56149)
    at Object.invokeGuardedCallbackDev (build.js:56198)
    at invokeGuardedCallback (build.js:56253)
build.js:80104 Uncaught Error: A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://fb.me/react-crossorigin-error for more information.
    at Object.invokeGuardedCallbackDev (build.js:56209)
    at invokeGuardedCallback (build.js:56253)
    at beginWork$$1 (build.js:81593)
    at performUnitOfWork (build.js:80511)
    at workLoopSync (build.js:80484)
    at performSyncWorkOnRoot (build.js:80083)
    at scheduleUpdateOnFiber (build.js:79511)
    at updateContainer (build.js:82916)
    at build.js:83341
    at unbatchedUpdates (build.js:80246)

Screenshot

screnschot

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions