Dynamically set header title for screen based on navigation parameter
J
Jamie Catterall
It would be very useful if I could set the title on the navigation header bar of a screen dynamically, so that loading the same screen with different information shows a different title on the screen.
As an example, if one of my screens is a list of books and another screen shows the details for any book selected on the first screen, then if I select "The Wizard of Oz" in the first screen, the title of the details screen should be "The Wizard of Oz", whereas selecting "The Lord of the Rings" would result the details screen having the title "The Lord of the Rings", and etc.
This is a feature in React Navigation 6, so I hope it can be implemented in Draftbit. https://reactnavigation.org/docs/headers
Dave Sebek
Thanks for the feedback. It is possible to do this currently using some custom code. Take a look at this post and comments: https://community.draftbit.com/c/code-snippets/how-to-change-stack-navigation-per-screen