
Install react-native-navbar:
yarn:
$ yarn add react-native-navbar
npm:
$ npm install react-native-navbar --save
Import it in the file where you want to use it:
import NavigationBar from 'react-native-navbar';
Add it to your React element tree:
const styles = {
container: {
flex: 1,
},
};
const rightButtonConfig = {
title: 'Next',
handler: () => alert('hello!'),
};
const titleConfig = {
title: 'Hello, world',
};
function ComponentWithNavigationBar() {
return (
<View style={styles.container}>
<NavigationBar
title={titleConfig}
rightButton={rightButtonConfig}
/>
</View>
);
}
That's it, you're ready to go!
This module uses JSX syntax and requires a compiler such as babel. React Native's packager runs this automatically but if you use Webpack be sure to compile this module from your dependencies
loaders: [{
test: /\.js$/,
include: [
path.resolve(__dirname, "src"),
path.resolve(__dirname, "node_modules/react-native-navbar")
],
loader: 'babel',
query: { stage: 0, plugins: [] }
}]
Feel free to ping me on twitter If you want to report a bug, please submit an issue!
Overall
Maintained
Code review
Latest release
Releases this year
9,679 followers · starred Apr 2015
2,626 followers · starred Apr 2015
91 followers · starred Nov 2016
339 followers · starred Mar 2015

Install react-native-navbar:
yarn:
$ yarn add react-native-navbar
npm:
$ npm install react-native-navbar --save
Import it in the file where you want to use it:
import NavigationBar from 'react-native-navbar';
Add it to your React element tree:
const styles = {
container: {
flex: 1,
},
};
const rightButtonConfig = {
title: 'Next',
handler: () => alert('hello!'),
};
const titleConfig = {
title: 'Hello, world',
};
function ComponentWithNavigationBar() {
return (
<View style={styles.container}>
<NavigationBar
title={titleConfig}
rightButton={rightButtonConfig}
/>
</View>
);
}
That's it, you're ready to go!
This module uses JSX syntax and requires a compiler such as babel. React Native's packager runs this automatically but if you use Webpack be sure to compile this module from your dependencies
loaders: [{
test: /\.js$/,
include: [
path.resolve(__dirname, "src"),
path.resolve(__dirname, "node_modules/react-native-navbar")
],
loader: 'babel',
query: { stage: 0, plugins: [] }
}]
Feel free to ping me on twitter If you want to report a bug, please submit an issue!
Overall
Maintained
Code review
Latest release
Releases this year
9,679 followers · starred Apr 2015
2,626 followers · starred Apr 2015
91 followers · starred Nov 2016
339 followers · starred Mar 2015