Skip to content

Instantly share code, notes, and snippets.

@moonrailgun
Created August 2, 2017 06:33
Show Gist options
  • Save moonrailgun/2c0d0a13a354ff48a918b0ff2d107152 to your computer and use it in GitHub Desktop.
Save moonrailgun/2c0d0a13a354ff48a918b0ff2d107152 to your computer and use it in GitHub Desktop.
react 代码片段
# 组合导航状态
import { StackNav, TabNav } from '../AppNavigator';
const stackAction = StackNav.router.getActionForPathAndParams('Root');
const stackState = StackNav.router.getStateForAction(stackAction);
const tabAction = TabNav.router.getActionForPathAndParams('main');
const initialNavState = TabNav.router.getStateForAction(tabAction, stackState);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment