Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do I change the back button image in stack navigator in react native?

I’ve already seen documents but I don’t really understand and I want somebody to show me how to change the image of the back button in react native. enter image description here

I want to change the back arrow to a chevron or something. Could you please show me the code on how to do this?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

In your StackNavigator, provide the screenOptions prop with headerBackImageSource set to the back arrow icon or image you want.

    <Stack.Navigator
      initialRouteName="Home"
      screenOptions={{
        headerBackImageSource: `...image source...`
      }}
    >
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading