Kureev / Kureev/react-native-navbar

Left Custom Button is not showing

Open
#119 1 comment 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
JavaScript
Stars
1.9k
Forks
318
PR merge metrics
No merged PRs in 30d

Description

//index.ios.js

``` javascript
renderScene (route, navigator) {
let Component = route.component;
let navBar = route.navigationBar;

if (navBar) {
navBar = React.cloneElement(navBar, { navigator, route, });
}
return (

{navBar}


);
}

render() {
return (

);
}
```

//...
//Login.js

``` javascript
onSignUp() {
this.props.navigator.push({
component: SignUp,
footerText: this.footerText(),
navigationBar: (
}
title={{title: "SIGN UP", tintColor: "white"}}
style={styles.navigator} />
)
});
}
```

//NavBarButton

``` javascript
export default class NavBarButton extends Component {

render() {
const { iconName, } = this.props;
const charmander = 'http://oyster.ignimgs.com/mediawiki/apis.ign.com/pokemon-blue-version/d/d4/Charmander.gif';
return (



);
}
}
```

I checked the example and followed it but the leftButton property doesn't get the custom button. Any suggestion?

screen shot 2015-12-09 at 12 18 27 pm

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the navigation flow in index.ios.js and Login.js, then inspect how NavigationBar handles the leftButton prop supplied by the route. Reproduce the SignUp navigation with NavBarButton and compare it with the example; done means the custom button is visible in the navigation bar and responds to its onPress handler.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
frontend, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.