Created
May 18, 2016 16:01
-
-
Save callmephilip/3b07e4b09004e5025272785c2d32dc6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ReactNative from 'react-native'; | |
const { NavigationExperimental } = ReactNative; | |
const { Reducer: NavigationReducer } = NavigationExperimental; | |
const feedNavigation = NavigationReducer.StackReducer({ | |
getPushedReducerForAction: (action) => { | |
if (action.type === 'push') { | |
return (state) => (state || action.route); | |
} | |
return null; | |
}, | |
initialState: { | |
key: 'feed', | |
index: 0, | |
children: [ | |
{ | |
key: 'list', | |
title: 'Items' | |
}, | |
], | |
}, | |
}); | |
module.exports = feedNavigation; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment