Uncaught (in promise) Invariant Violation: Element 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.
when you use the compent code by yourself
that would cause error
former
import {CompanySwitch} from './companySwitch';
and what should we use?
later
import CompanySwitch from './companySwitch';
so this is the reason causing type error that I meet
maybe that will help you
If this blog helps you, can you give a like ! ! Thank you ! !