Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Invariant Violation #98

Closed
fabioplaka opened this issue Sep 27, 2019 · 5 comments
Closed

Invariant Violation #98

fabioplaka opened this issue Sep 27, 2019 · 5 comments

Comments

@fabioplaka
Copy link

fabioplaka commented Sep 27, 2019

Hello,
I have an error with the library in react-native app. The application is open successfully but when I go to login, it gives me error that say:
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.
Check the render method of NavigatorReduxWrapper.

Please if anyone has this error before, give me a solution.
Simulator Screen Shot - iPhone XS Max - 2019-09-27 at 11 14 28

@hight89
Copy link

hight89 commented Sep 27, 2019

Hello, i have same problem.

"react-navigation-redux-helpers": "3.0.6",
"react-navigation": "3.13.0"

If i delete the component from the render method it's works fine.

I know it's not a solution. But i can continue my work, and maybe help for a solution.

@fabioplaka
Copy link
Author

Same error. Please show me in which class did you delete component from render method?

@hight89
Copy link

hight89 commented Sep 27, 2019

Hello, i have same problem.

"react-navigation-redux-helpers": "3.0.6",
"react-navigation": "3.13.0"

If i delete the component from the render method it's works fine.

I know it's not a solution. But i can continue my work, and maybe help for a solution.

Upgrade "react-navigation" 4.x or downgrade react-navigation-redux-helpers!

@Ashoat
Copy link
Member

Ashoat commented Sep 27, 2019

Oopsie. React Navigation 3.12 has ThemeContext, but doesn't have ThemeProvider (which is just ThemeContext.provider). But earlier versions of React Navigation 3 doesn't have either.

In retrospect this is a breaking change since this library no longer works with React Navigation 3.11 or earlier. I'm going to back out the ThemeContext usage and release a 3.0.7 version. And then I'll release a new 4.0 that uses ThemeContext.provider so that it works with either React Navigation 3.12 or 4.0.

Thanks for the report and sorry for the mix-up!

@Ashoat
Copy link
Member

Ashoat commented Sep 27, 2019

Okay, so:

  • If you're using react-navigation@3.11 or earlier, update to react-navigation-redux-helpers@3.0.7
  • If you're using react-navigation@3.12 or later, update to react-navigation-redux-helpers@4.0.0

@Ashoat Ashoat closed this as completed Sep 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants