react-navigation api

1
 this.props.navigation.goBack() 

2 
https://reactnavigation.org/docs/2.x/navigation-actions/
import { NavigationActions } from 'react-navigation';
// 下面五NavigationActions 个是它的方法
 NavigateAction.goBack()
Navigate - Navigate to another route
Back - Go back to previous state
Set Params - Set Params for given route
Init - Used to initialize first state if state is undefined
3
//设置Url参数
 this.props.navigation.setParams({ increaseCount: this._increaseCount });
 4
 // 获取url参数
navigation.getParam('increaseCount')
5
// 跳转路由
 this.props.navigation.navigate('Auth');
上一篇:利用scroll实现侧边栏固定


下一篇:Anaconda的使用