You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 - welldone-software/why-did-you-render#121Where the fix appeared to be tweaking the order of the react component checks - welldone-software/why-did-you-render@983a18f
The text was updated successfully, but these errors were encountered: