score:5
Accepted answer
Suspense and lazy
are reachable in the following versions :
"react": "^16.6.3"
"react-dom": "^16.6.3"
This error relates to the react-dom
which was not upgraded correctly!
score:1
Here is a very simple example that should work using similar dependencies.
I would recommend ensuring that import('./_header')
resolves to the correct module, to check again that there is a default export and that it is a React component type. Additionally, make sure { fallback }
for the suspense component is a component type as well.
Source: stackoverflow.com
Related Query
- Building navbar and I get this error Element type is invalid: expected a string (for built-in components) or a class/function for composite components
- React Native Element type is invalid expected a string but got undefined
- Invariant Violation: Element type is invalid: expected a string or a class but got: undefined. Check the render method of `MyApp`
- Element type is invalid: expected a string (for built-in components) for React
- React.jsx: type is invalid -- expected a string (for built-in components) - Try convert class component to functional component react
- React High Order Components Error: Element type is invalid: expected a string or a class/function but got: object
- Error: Element type is invalid: expected a string for the library: react-jsonschema-form
- Faded Cards in material-ui crashing web application raising element type is invalid expected a string error
- Error: Element type is invalid expected a string
- Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function but got: object
- React.createElement: type is invalid -- expected a string
- React Native error: Element type is invalid: expected a string or a class/function but got: object
- Element type is invalid: expected a string (for built-in components) or a class/function
- Proper TypeScript type for creating JSX element from string
- React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object
- React Bootstrap Accordion Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components)
- React How to fix Failed prop type - Invalid prop of type string expected object
- React SSR error -- Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object
- How to fix Element type is invalid: expected a string (for built-in components)?
- NextJS: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined
- React Memo Feature gives :- Uncaught Error: Element type is invalid: expected a string but got: object
- Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object
- Element type is invalid: expected a string (...) but got: object
- Why am Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: number
- Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: symbol
- React.js Context API: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components)
- How to fix Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object
- Gettting React.createElement: type is invalid -- expected a string ... but got: undefined
- Next Js Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined
- Element type is invalid: expected a string (for built-in components) or a class/function React Error
More Query from same tag
- How to import and play all audio files from a directory in React?
- In React, How to Return JSX together with JS Function that returns more JSX?
- display sum of individual items in react
- cannot read property of null doing destructing
- Covariant Flow types generated by Relay mutation vs non-covariant in Queries
- Webpack check file exist and import in condition
- React and firebase setState 'you must specify the "to" property'
- Getting error 405 when sending request on express route in next js
- FP alternative to polymorphism in JavaScript/ReactJS
- Why does my repository change after running npm run deploy?
- Error "Cannot read property 'grid' of undefined" with React Stack Grid
- I have a problem entering data into an object using FOR
- using conditional component with the same route path in reactjs
- react map method - put callback function separately and send arguments
- JQuery in ReactJS: TypeError: jquery__WEBPACK_IMPORTED_MODULE_18___default(...)(...).sortable is not a function
- React Hook is called in function that is neither a React function component nor a custom React Hook function
- Making Axios post Req from Gatsby JS
- React App: how to pass a variable to other file and read its value there
- ReactNative Webview
- Delete function bug on a node using React-Konva
- onClick overrides Semantic UI's dropdown
- ReactJS: How to set state of an object selected via radio button?
- How do you use the action and extra properties on an AntDesign List in react?
- Break lines at " -"
- How to cancel previous express request, so that new request gets executed?
- Keeping sticky positioning behaviour when sticky elements are inside a container (because of React having to render a single parent element)
- React datepicker and typescript
- ReactJS: save state when navigate with browser button
- Django rest framework how to pass authorizing token in nextjs post request?
- Using fetch to set state before the page renders