美文网首页
2019-04-29 使用了react-navigatio

2019-04-29 使用了react-navigatio

作者: 无尽甜蜜里悠悠记忆 | 来源:发表于2019-04-29 09:25 被阅读0次

24212eb835 - Keep react navigation new and react-navigation-redux-helpe : 此次更新适配了react-navigation-redux-helpers3.0;

react-navigation-redux-helpers3.0的两个变更:

1.reduxifyNavigator被改名为createReduxContainer,所以:

import {createReactNavigationReduxMiddleware, reduxifyNavigator} from 'react-navigation-redux-helpers';

//改为

import {createReactNavigationReduxMiddleware, createReduxContainer} from 'react-navigation-redux-helpers';

...

const AppWithNavigationState = reduxifyNavigator(RootNavigator, 'root');

//改为

const AppWithNavigationState = createReduxContainer(RootNavigator, 'root');

2.createReactNavigationReduxMiddleware的参数顺序发生了变化:

export const middleware = createReactNavigationReduxMiddleware(

    'root',

    state => state.nav

);

//改为

export const middleware = createReactNavigationReduxMiddleware(

    state => state.nav,

    'root'

);

相关文章

网友评论

      本文标题:2019-04-29 使用了react-navigatio

      本文链接:https://www.haomeiwen.com/subject/wqyenqtx.html