Please take a look at my online project I created in snack https://snack.expo.dev/@sujono/7c4a2d?platform=android .
So in Role2.js I did set the values but the result isn't what i expected. This is so weird. I even tried it locally, but it still didn't work. Can't I change the style of react native header? If I can, please tell me how to do it.
You can make a
Custom header
, And you have to call it on every screen.Usually we have three main component on Header
Container
,context
&functionality
.(context = title & icons on both sides)
So, Header Component be like this,
This is the main structure, now you have to handle some cases like, when icon is missing text should still be centered, and other according to your need.
This is Expo Snack for the complete component and usage. I will make nesseccery changes but the main concept will be same.