This file contains hidden or 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
| git clone https://github.com/thebakeryio/baker.git TodoMVC | |
| cd TodoMVC && npm install && npm run setup |
This file contains hidden or 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
| git clone https://github.com/thebakeryio/todomvc-react-native.git | |
| cd todomvc-react-native && npm install | |
| npm run ios | |
| npm run android |
This file contains hidden or 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 globalNavigation from './components/GlobalNavigation/reducer'; | |
| import tabs from './components/ApplicationTabs/reducer'; | |
| import feed from './components/Feed/reducer'; | |
| import { combineReducers } from 'redux-immutable'; | |
| const scopeNavigationReducer = (reducer, scopeName) => { | |
| return (state, action) => { | |
| if (action.scope && action.scope !== scopeName) { | |
| return state; | |
| } else { |
This file contains hidden or 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; |
This file contains hidden or 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
| export default connect(mapStateToProps, mapDispatchToProps, (stateProps, dispatchProps, ownProps) => { | |
| return Object.assign({}, ownProps, stateProps, dispatchProps, { | |
| onNavigate: (action) => { | |
| dispatchProps.dispatch(Object.assign(action, { | |
| scope: action.scope || stateProps.navigation.key | |
| })); | |
| } | |
| }); | |
| })(Feed); |
This file contains hidden or 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 { View, NavigationExperimental } from 'react-native'; | |
| import React, { Component } from 'react'; | |
| import styles from './styles'; | |
| import { connect } from 'react-redux'; | |
| import Items from '../Items'; | |
| import ItemDetails from '../ItemDetails'; | |
| const { CardStack: NavigationCardStack } = NavigationExperimental; | |
| class Feed extends Component { |
This file contains hidden or 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; |