请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

注意注意:使用了react-navigation-redux-helpers3.0的同学请注意!!!

课程代码已对react-navigation-redux-helpers3.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'
);

正在回答 回答被采纳积分+3

问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信