expo / examples

Example projects that demonstrate how to use Expo APIs and integrate Expo with other popular tools
2.23k stars 867 forks source link

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 1 month ago

joaobeji commented 1 month ago
          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.