Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of App. Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. #491

Open
joaobeji opened this issue Jul 20, 2024 · 0 comments

Comments

@joaobeji
Copy link

          this error just means you are trying to render something that is undefined. for example:
let MyComponent = undefined

return <MyComponent />

that will give you this error


Your placement makes sense.

After many days of fighting and looking for a solution, we were left with the components that were being called by "<Route path="/" element={} />", the error was because the "Home" component did not exist nothing, I just creat
Capturar
ed the home function and that's it, resolved.

@joaobeji joaobeji changed the title this error just means you are trying to render something that is undefined. for example: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of App. Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant