I've found if I export a component, "ComponentA" as:
withRouter(connect()(ComponentA)
I was getting the error:
Warning: React.createElement: 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.
which appeared to originate from react-ssr-prepass.
I can "fix" this in my code by wrapping ComponentA differently:
connect()(withRouter(ComponentA))
I haven't got the capacity or knowledge to look into this further at the moment but wanted to highlight it in case it is an underlying bug that perhaps impacts others? (Apologies if this is just some weird quirk unique to my code!)
Hi,
Using:
I've found if I export a component, "ComponentA" as:
withRouter(connect()(ComponentA)
I was getting the error:
Warning: React.createElement: 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.
which appeared to originate from
react-ssr-prepass
.I can "fix" this in my code by wrapping ComponentA differently:
connect()(withRouter(ComponentA))
I haven't got the capacity or knowledge to look into this further at the moment but wanted to highlight it in case it is an underlying bug that perhaps impacts others? (Apologies if this is just some weird quirk unique to my code!)
I did see an issue I thought might be related in the
why-did-you-render
repo - https://github.com/welldone-software/why-did-you-render/issues/121Where the fix appeared to be tweaking the order of the react component checks - https://github.com/welldone-software/why-did-you-render/commit/983a18fd72a61c02859c6c44d9eebe95a07ab3a3