Skip to content

Instantly share code, notes, and snippets.

View anosikeosifo's full-sized avatar

Anosike Osifo anosikeosifo

View GitHub Profile
export default class LargeApp extends Component {
render() {
return (
<Provider store={myStore}>
<Layout>
<ApplicationNavigator />
</Layout>
</Provider>
);
}
import { combineReducers } from "redux";
import eventData from "features/events/reducers";
import exploreData from "features/explore/reducers";
import navigationData from "navigation/reducers";
export default combineReducers({
eventData,
exploreData,
navigationData
});
let initialState = {
index: 0,
routes: [
{
key: "initialLogin",
routeName: <initial_screen_name>
}
]
};
export default TabNavigator(
{
[screenNames.EXPLORE]: {
screen: Explore
},
[screenNames.USER_PROFILE]: {
screen: Explore
}
},
import { StackNavigator } from "react-navigation";
import AuthNavigator from "./authentication";
import MainNavigator from "./main";
import * as screenNames from "../screen_names";
import Splash from "features/splash/containers";
const appNavigator = StackNavigator({
[screenNames.SPLASH]: {
screen: Splash
},
//imports the navigators we've defined for our app
import ApplicationNavigator from "../navigators";
//used in connecting the app's navigation data to redux
import { addNavigationHelpers } from "react-navigation";
//takes the navigation slice of state and maps it to a prop, so we can used it around the application.
const mapStateToProps = state => ({
navigation: state.navigationData
});
import { NavigationActions } from "react-navigation";
import * as screenNames from "../screen_names";
export const navigateToLogin = () =>
NavigationActions.navigate({
routeName: screenNames.LOGIN
});
export const navigateToSplash = () =>
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import Explore from "../components/explore"; //imports the feature's entry component.
import { navigateToLogin } from "navigation/actions"; //imports navigation action to be used by feature
import { getExploreData } from "../actions"; // imports action creators as needed.
import { getCategoryListing } from "../selectors"; // imports selectors as needed.
const mapStateToProps = state => ({
exploreData: state.exploreData,
@anosikeosifo
anosikeosifo / .block
Last active September 9, 2017 14:13
Histogram Demo
license: mit
@anosikeosifo
anosikeosifo / .block
Last active September 5, 2017 11:03
XML Parsing
license: gpl-3.0