Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add automatical wrapping routes with type='switch'
  • Loading branch information
Pavlo Aksonov authored and Pavlo Aksonov committed Dec 8, 2015
commit d76524dbef8cc54d2f3db8163e999f3b3dfc8bf0
109 changes: 22 additions & 87 deletions Example/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 4 additions & 20 deletions Example/Example.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,10 @@ export default class Example extends React.Component {
<Route name="tab1_2" component={TabView} title="Tab #1_2" />
</Router>
</Route>
<Route name="tab2" icon={TabIcon} schema="tab" title="Tab #2" >
<Router>
<Route name="tab2_1" component={TabView} title="Tab #2" />
</Router>
</Route>
<Route name="tab3" icon={TabIcon} schema="tab" title="Tab #3" >
<Router>
<Route name="tab3_1" component={TabView} title="Tab #3" />
</Router>
</Route>
<Route name="tab4" icon={TabIcon} schema="tab" title="Tab #4" >
<Router>
<Route name="tab4_1" component={TabView} title="Tab #4" />
</Router>
</Route>
<Route name="tab5" icon={TabIcon} schema="tab" title="Tab #5" >
<Router>
<Route name="tab5_1" component={TabView} title="Tab #5" />
</Router>
</Route>
<Route name="tab2" icon={TabIcon} schema="tab" title="Tab #2" component={TabView} />
<Route name="tab3" icon={TabIcon} schema="tab" title="Tab #3" component={TabView} />
<Route name="tab4" icon={TabIcon} schema="tab" title="Tab #4" component={TabView} />
<Route name="tab5" icon={TabIcon} schema="tab" title="Tab #5" component={TabView} />
</Router>
</Route>
</Router>
Expand Down
2 changes: 1 addition & 1 deletion Example/components/TabView.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TabView extends React.Component {
render(){
return (
<View style={styles.container}>
<Text>Tab #{this.props.name}</Text>
<Text>Tab {this.props.title}</Text>
{this.props.name === "tab1_1" &&
<Button onPress={Actions.tab1_2}>next screen for tab1_1</Button>
}
Expand Down
32 changes: 0 additions & 32 deletions TabBar.js

This file was deleted.

Loading