Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thekevinscott/e30602505f9b394f9d17575af29ad62a to your computer and use it in GitHub Desktop.
Save thekevinscott/e30602505f9b394f9d17575af29ad62a to your computer and use it in GitHub Desktop.
import typeToReducer from 'type-to-reducer';
import {
ActionConst,
} from 'react-native-router-flux';
const initialState = {
scene: {
name: 'Games Overview',
key: 'Games Overview',
title: 'Games Overview',
},
};
export default typeToReducer({
[ActionConst.FOCUS]: (state, { scene }) => ({
scene: {
name: scene.name,
key: scene.sceneKey,
title: scene.title,
},
}),
}, initialState);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment