I am getting this error:
Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/funct
In my case, one of the exported child module was not returning a proper react component.
const Component = Content ;
instead of
const Component = () => Content;
The error shown was for the parent, hence couldn't figure out.