|
@@ -1,13 +1,17 @@
|
|
"use strict";
|
|
"use strict";
|
|
|
|
|
|
import React, {Component} from 'react';
|
|
import React, {Component} from 'react';
|
|
-import {createReactNavigationReduxMiddleware, createReduxBoundAddListener} from 'react-navigation-redux-helpers';
|
|
|
|
|
|
+import {
|
|
|
|
+ createReactNavigationReduxMiddleware,
|
|
|
|
+ createReduxBoundAddListener,
|
|
|
|
+ createNavigationReducer
|
|
|
|
+} from 'react-navigation-redux-helpers';
|
|
import {connect} from 'react-redux';
|
|
import {connect} from 'react-redux';
|
|
|
|
|
|
export const navigatorPieces = (BareNavigator, name = "root") => {
|
|
export const navigatorPieces = (BareNavigator, name = "root") => {
|
|
const middleware = createReactNavigationReduxMiddleware(name, x => x);
|
|
const middleware = createReactNavigationReduxMiddleware(name, x => x);
|
|
const addListener = createReduxBoundAddListener(name);
|
|
const addListener = createReduxBoundAddListener(name);
|
|
- const reducer = (state, action) => BareNavigator.router.getStateForAction(action, state);
|
|
|
|
|
|
+ const reducer = createNavigationReducer(BareNavigator);
|
|
|
|
|
|
class Navigator extends Component {
|
|
class Navigator extends Component {
|
|
render () {
|
|
render () {
|