Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.

Maybe allow renderBackButton in the navigationBar config #11

Open
chirag04 opened this issue Jul 29, 2016 · 1 comment
Open

Maybe allow renderBackButton in the navigationBar config #11

chirag04 opened this issue Jul 29, 2016 · 1 comment

Comments

@chirag04
Copy link
Contributor

chirag04 commented Jul 29, 2016

renderBackButton would let us customize the back button UI and then i can just pass that to defaultRouteConfig.

Usually an app would have mulitple StackNavigations so i would still need to add renderBackButton to all the stacknavigators defaultRouteConfigs.

One can also override the BackButton component globally like this:

import { withNavigation, NavigationBar } from '@exponent/ex-navigation';

const myBackButton = () => <View />;

NavigationBar.BackButton = BackButton;

It's a trade off and idk what's the best api here. cc @brentvatne @skevy @ide

@ide
Copy link
Member

ide commented Jul 30, 2016

Globally overriding it on NavigationBar doesn't seem right to me. Better to do it per-instance for when you have multiple nav bars or to be able to create a new class that composes with NavBar and uses your BackButton. Wanting to configure all back buttons within a stack seems reasonable though.

@skevy skevy changed the title [Enhancement] Maybe allow renderBackButton in the navigationBar config Maybe allow renderBackButton in the navigationBar config Aug 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants