Kureev / Kureev/react-native-navbar
Left Custom Button is not showing
- 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?
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