You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The app fails with the message: Invariant violation: Element type is invalid: expected a string or a class but got: object. Check the render method of HeaderBackButton
Hey! Thanks for opening the issue. Can you provide a minimal repro which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible. The easiest way to provide a repro is on snack.expo.io. If it's not possible to repro it on snack.expo.io, then you can also provide the repro in a GitHub repository.
Current Behavior
I am trying to set a custom image for the back button. I am working in a bare RN project (no Expo). This is my code:
The app fails with the message:
Invariant violation: Element type is invalid: expected a string or a class but got: object. Check the render method of HeaderBackButton
I checked the render method of HeaderBackButton - apparently, it uses its own back button image - https://github.com/react-navigation/react-navigation/blob/master/packages/stack/src/views/Header/HeaderBackButton.tsx#L71
Expected Behavior
I expect the back button to be replaced by my local image.
How to reproduce
Set an
Image
element to theheaderBackImage
property. Make sure to specify a source for theImage
.Your Environment
The text was updated successfully, but these errors were encountered: