@@ -104,6 +104,10 @@ export default class App extends React.Component {
104104 }
105105 ]
106106
107+ state = {
108+ activeTab: ' games'
109+ }
110+
107111 renderIcon = icon => ({ isActive }) => (
108112 < Icon size= {24 } color= " white" name= {icon} / >
109113 )
@@ -124,6 +128,7 @@ export default class App extends React.Component {
124128 {/* Your screen contents depending on current tab. */ }
125129 < / View>
126130 < BottomNavigation
131+ activeTab= {this .state .activeTab }
127132 onTabPress= {newTab => this .setState ({ activeTab: newTab .key })}
128133 renderTab= {this .renderTab }
129134 tabs= {this .tabs }
@@ -152,13 +157,11 @@ You can also view the entire documentation on GitBook: https://timomeh.gitbook.i
152157
153158### React Navigation Support
154159
155- In contrary to earlier releases, this library _ does not support_ React Navigation out of the box (called ` NavigationComponent ` in earlier releases). React Navigation now ships with an own Material Bottom Navigation: [ ` createMaterialBottomTabNavigator ` ] ( https://reactnavigation.org/docs/en/material-bottom-tab-navigator.html ) .
156-
157- The API of React Navigation changes quite frequently, and (until now) it wasn't always easy to keep track of changes and be up-to-date. Also I don't want to favor and promote React Navigation over other Navigation Libraries.
160+ ** Check [ this example] ( /examples/with-react-navigation.js ) for a custom React Navigation integration.**
158161
159- You can still implement the Bottom Navigation on your own, for example by using React Navigation's [ Custom Navigator ] ( https://reactnavigation.org/docs/en/custom-navigator-overview .html ) .
162+ In contrary to earlier releases, this library does not support React Navigation _ out of the box _ . React Navigation now ships with its own Material Bottom Navigation: [ ` createMaterialBottomTabNavigator ` ] ( https://reactnavigation.org/docs/en/material-bottom-tab-navigator .html ) .
160163
161- If you integrate material-bottom-navigation with a navigation library in your project, feel free to share your knowledge by contributing to the Documentation or event create your own module which uses react-native-material-bottom- navigation.
164+ You can still implement react-native- material-bottom-navigation manually by using React Navigation's [ Custom Navigators ] ( https://reactnavigation.org/docs/en/custom-navigators.html#api-for-building-custom-navigators ) . Check out [ this example ] ( /examples/with- react-navigation.js ) .
162165
163166### Updated Material Design Specs
164167
@@ -176,9 +179,9 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
176179
177180<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
178181<!-- prettier-ignore -->
179- | [<img src="https://avatars3.githubusercontent.com/u/4227520?v=4" width="100px;"/><br /><sub><b>Timo Mämecke</b></sub>](https://twitter.com/timomeh)<br />[🐛](https://github.com/timomeh/react-native-material-bottom-navigation/issues?q=author%3Atimomeh "Bug reports") [💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=timomeh "Code") [🎨](#design-timomeh "Design") [📖](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=timomeh "Documentation") [💡](#example-timomeh "Examples") [🚇](#infra-timomeh "Infrastructure (Hosting, Build-Tools, etc)") [🤔](#ideas-timomeh "Ideas, Planning, & Feedback") [👀](#review-timomeh "Reviewed Pull Requests") | [<img src="https://avatars3.githubusercontent.com/u/11575429?v=4" width="100px;"/><br /><sub><b>Shayan Javadi</b></sub>](https://www.shayanjavadi.com/)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=ShayanJavadi "Code") | [<img src="https://avatars2.githubusercontent.com/u/14214500?v=4" width="100px;"/><br /><sub><b>David</b></sub>](https://github.com/davidmpr)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=davidmpr "Code") | [<img src="https://avatars2.githubusercontent.com/u/19354816?v=4" width="100px;"/><br /><sub><b>Jayser Mendez</b></sub>](http://steemia.io)<br />[📖](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=jayserdny "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/10601911?v=4" width="100px;"/><br /><sub><b>Peter Kottas</b></sub>](https://www.facebook.com/tipsforholiday)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=PeterKottas "Code") | [<img src="https://avatars0.githubusercontent.com/u/97068?v=4" width="100px;"/><br /><sub><b>Matt Oakes</b></sub>](https://mattoakes.net)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=matt-oakes "Code") | [<img src="https://avatars0.githubusercontent.com/u/1533112?v=4" width="100px;"/><br /><sub><b>Keeley Carrigan</b></sub>](http://www.keeleycarrigan.com)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=keeleycarrigan "Code") |
182+ | [<img src="https://avatars3.githubusercontent.com/u/4227520?v=4" width="100px;" alt="Timo Mämecke"/><br /><sub><b>Timo Mämecke</b></sub>](https://twitter.com/timomeh)<br />[🐛](https://github.com/timomeh/react-native-material-bottom-navigation/issues?q=author%3Atimomeh "Bug reports") [💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=timomeh "Code") [🎨](#design-timomeh "Design") [📖](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=timomeh "Documentation") [💡](#example-timomeh "Examples") [🚇](#infra-timomeh "Infrastructure (Hosting, Build-Tools, etc)") [🤔](#ideas-timomeh "Ideas, Planning, & Feedback") [👀](#review-timomeh "Reviewed Pull Requests") | [<img src="https://avatars3.githubusercontent.com/u/11575429?v=4" width="100px;" alt="Shayan Javadi"/><br /><sub><b>Shayan Javadi</b></sub>](https://www.shayanjavadi.com/)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=ShayanJavadi "Code") | [<img src="https://avatars2.githubusercontent.com/u/14214500?v=4" width="100px;" alt="David"/><br /><sub><b>David</b></sub>](https://github.com/davidmpr)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=davidmpr "Code") | [<img src="https://avatars2.githubusercontent.com/u/19354816?v=4" width="100px;" alt="Jayser Mendez"/><br /><sub><b>Jayser Mendez</b></sub>](http://steemia.io)<br />[📖](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=jayserdny "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/10601911?v=4" width="100px;" alt="Peter Kottas"/><br /><sub><b>Peter Kottas</b></sub>](https://www.facebook.com/tipsforholiday)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=PeterKottas "Code") | [<img src="https://avatars0.githubusercontent.com/u/97068?v=4" width="100px;" alt="Matt Oakes"/><br /><sub><b>Matt Oakes</b></sub>](https://mattoakes.net)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=matt-oakes "Code") | [<img src="https://avatars0.githubusercontent.com/u/1533112?v=4" width="100px;" alt="Keeley Carrigan"/><br /><sub><b>Keeley Carrigan</b></sub>](http://www.keeleycarrigan.com)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=keeleycarrigan "Code") |
180183| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
181- | [<img src="https://avatars1.githubusercontent.com/u/177857?v=4" width="100px;"/><br /><sub><b>Sean Holbert</b></sub>](http://www.twitter.com/wildseansy)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=wildseansy "Code") | [<img src="https://avatars0.githubusercontent.com/u/9802139?v=4" width="100px;"/><br /><sub><b>Alessandro Parolin</b></sub>](https://github.com/aparolin)<br />[📖](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=aparolin "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/1837764?v=4" width="100px;"/><br /><sub><b>Prashanth Acharya M</b></sub>](https://github.com/prashantham)<br />[📖](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=prashantham "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/64609?v=4" width="100px;"/><br /><sub><b>Alexey Tcherevatov</b></sub>](https://github.com/lemming)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=lemming "Code") | [<img src="https://avatars2.githubusercontent.com/u/5009188?v=4" width="100px;"/><br /><sub><b>Trevor Atlas</b></sub>](https://blog.trevoratlas.com/)<br />[🐛](https://github.com/timomeh/react-native-material-bottom-navigation/issues?q=author%3Atrevor-atlas "Bug reports") |
184+ | [<img src="https://avatars1.githubusercontent.com/u/177857?v=4" width="100px;" alt="Sean Holbert"/><br /><sub><b>Sean Holbert</b></sub>](http://www.twitter.com/wildseansy)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=wildseansy "Code") | [<img src="https://avatars0.githubusercontent.com/u/9802139?v=4" width="100px;" alt="Alessandro Parolin"/><br /><sub><b>Alessandro Parolin</b></sub>](https://github.com/aparolin)<br />[📖](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=aparolin "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/1837764?v=4" width="100px;" alt="Prashanth Acharya M"/><br /><sub><b>Prashanth Acharya M</b></sub>](https://github.com/prashantham)<br />[📖](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=prashantham "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/64609?v=4" width="100px;" alt="Alexey Tcherevatov"/><br /><sub><b>Alexey Tcherevatov</b></sub>](https://github.com/lemming)<br />[💻](https://github.com/timomeh/react-native-material-bottom-navigation/commits?author=lemming "Code") [🐛](https://github.com/timomeh/react-native-material-bottom-navigation/issues?q=author%3Alemming "Bug reports") | [<img src="https://avatars2.githubusercontent.com/u/5009188?v=4" width="100px;" alt="Trevor Atlas"/><br /><sub><b>Trevor Atlas</b></sub>](https://blog.trevoratlas.com/)<br />[🐛](https://github.com/timomeh/react-native-material-bottom-navigation/issues?q=author%3Atrevor-atlas "Bug reports") |
182185<!-- ALL-CONTRIBUTORS-LIST:END -->
183186
184187This project follows the [ all-contributors] ( https://github.com/kentcdodds/all-contributors ) specification. Contributions of any kind welcome!
0 commit comments