-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the nav title without re-rendering #3065
Comments
I think this might be possible only if you use a custom smart A different alternative, hacky way, in case you are working with a sort of scrolling title replacement, it's to use conditional styles to apply the title over the Header (covering the header title). Have you tried to disable the animations before updating the title? |
@daviscabral Thanks for the feedback! I just tried to use redux to dispatch an action (new title) to the router component after the scrollview reaches the title switch point, but this is causing the whole screen to re-render which causes the scroll to start over... I have also tried removing the title and then using absolute positioning to place my own over it like you mentioned, but i can't seem to over ride the zIndex value of the RNRF navbar. Can you tell me more about this custom smart header? I thought using redux on the router component would do the trick, it caused the title to change but its causing a re-render on everything - maybe because its the overall wrapper? |
You may pass React component as header (i.e. smart header) that will listen for some redux/mobx events and changes the title. |
Why the default Header is not smart by default? |
Hi all,
Is it possible to change the nav title without re-rendering?
I am currently using this, which works:
The problem is there is animation taking place during this switch - when the switch happens it lags the whole animation. I even tried to do the switch before and after the animation but it still lags it.
Cheers.
The text was updated successfully, but these errors were encountered: