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
#!/usr/bin/env bash | |
# http://chetansachdev.com | |
# http://www.sirwinston.org/ | |
# Install Xcode | |
# Install Homebrew | |
# Install Node | |
# Install Yarn | |
# Install Gulp | |
# Install Bower | |
# Install Linters |
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 React, { Component } from 'react'; | |
import { Platform, View, StyleSheet, Text } from 'react-native'; | |
import { Provider } from "react-redux"; | |
import RootNavigatorContainer from './services/routes'; | |
import store from './services/store'; | |
class MainApp extends Component { | |
render() { | |
return ( | |
<Provider store={store}> |
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 React, { Component } from 'react'; | |
import Profile from "../components/Profile" | |
import Home from "../components/Home" | |
import { createBottomTabNavigator, createAppContainer } from 'react-navigation'; | |
import Icon from 'react-native-vector-icons/FontAwesome'; | |
const RootNavigator = createBottomTabNavigator({ | |
Home: { | |
screen: Home, |
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 React, { Component } from 'react'; | |
import { Platform, View, StyleSheet, Text } from 'react-native'; | |
import { connect } from 'react-redux'; | |
import { UPDATE_USER_DATA } from '../../helpers/actionTypes'; | |
const mapStateToProps = state => ({ ...state.profile }); | |
const mapDispatchToProps = dispatch => ({ | |
submitProfile: payload => | |
dispatch({ type: UPDATE_USER_DATA, payload }), |
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 React, { Component } from 'react'; | |
import { View, StyleSheet, Text } from 'react-native'; | |
import { connect } from 'react-redux'; | |
import { UPDATE_USER_DATA } from '../../helpers/actionTypes'; | |
const mapStateToProps = state => ({ ...state.profile }); | |
const mapDispatchToProps = dispatch => ({ | |
submitProfile: payload => | |
dispatch({ type: UPDATE_USER_DATA, payload }), |
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 { createStore } from "redux"; | |
import reducer from "./reducer"; | |
export default createStore(reducer); |
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 { combineReducers } from 'redux'; | |
import home from './reducers/home' | |
import profile from './reducers/profile' | |
export default combineReducers({ profile }) |
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 { UPDATE_USER_DATA } from '../../helpers/actionTypes'; | |
const defaultState = { | |
currentUserName: "kumar" | |
} | |
export default (state = defaultState, action) => { | |
switch (action.type) { | |
case UPDATE_USER_DATA: | |
return { |
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
export const UPDATE_USER_DATA = 'UPDATE_USER_DATA'; |