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
# iOS | |
app_identifier "com.myapp.app" # The bundle identifier of your app | |
apple_id "[email protected]" # Your Apple email address | |
team_id "1234ABCD" # Developer Portal Team ID | |
# Android | |
json_key_file "./google-play-api-secret.json" # Path to the json secret file - Follow https://github.com/fastlane/supply#setup to get one | |
package_name "com.myapp.app" # Your Android app package |
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 React, { Component, PropTypes } from 'react' | |
import { Dimensions, Modal, StyleSheet } from 'react-native' | |
import { View } from 'react-native-animatable' | |
const DEVICE_WIDTH = Dimensions.get('window').width | |
const DEVICE_HEIGHT = Dimensions.get('window').height | |
const DEFAULT_COLOR = '#001a33' | |
export default class CustomModal extends Component { | |
static propTypes = { |
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 mobx from 'mobx' | |
const DEFAULT_STYLE = 'color: #006d92; font-weight:bold;' | |
// Just call this function after MobX initialization | |
// As argument you can pass an object with: | |
// - collapsed: true -> shows the log collapsed | |
// - style -> the style applied to the action description | |
export const startLogging = ({ collapsed, style } = {}) => { | |
mobx.spy(event => { |
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 function* signup (action) { | |
const { email, password } = action | |
try { | |
const user = yield call(parseService.signup, email, password) | |
yield put({ type: authActionTypes.SIGNUP_SUCCESS, user }) | |
yield call(loginSuccess, user) | |
} catch (err) { | |
const error = err.message || err | |
yield put({ type: authActionTypes.SIGNUP_FAILURE, error }) | |
} |
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
// ACTIONCREATORS USAGE EXAMPLE 1 | |
// When the action needed are all in a single duck (in this case authReducer) | |
import React, { Component, PropTypes } from 'react' | |
import { connect } from 'react-redux' | |
import { bindActionCreators } from 'redux' | |
import { actionCreators } from '../reducers/authReducer' | |
const mapStateToProps = (state, ownProps) => ({ | |
// blablabla | |
}) |
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 { call, put } from 'redux-saga/effects' | |
import * as parseService from '../services/parseService' | |
import { actionTypes as authActionTypes } from '../reducers/authReducer' | |
import { actionTypes as navigationActionTypes } from '../reducers/navigationReducer' | |
import * as routes from '../config/routes' | |
export function* autoLogin (action) { | |
const user = yield call(parseService.currentUser) | |
if (user) { | |
yield call(loginSuccess, user) |
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 { find, findIndex, pullAt } from 'lodash' | |
import { actionTypes as appActionTypes } from 'reducers/appReducer' | |
export const actionTypes = { | |
CREATE_MENU_ENTRY_REQUEST: 'MENU/CREATE_MENU_ENTRY_REQUEST', | |
CREATE_MENU_ENTRY_SUCCESS: 'MENU/CREATE_MENU_ENTRY_SUCCESS', | |
CREATE_MENU_ENTRY_FAILURE: 'MENU/CREATE_MENU_ENTRY_FAILURE', | |
UPDATE_MENU_ENTRY_REQUEST: 'MENU/UPDATE_MENU_ENTRY_REQUEST', | |
UPDATE_MENU_ENTRY_SUCCESS: 'MENU/UPDATE_MENU_ENTRY_SUCCESS', | |
UPDATE_MENU_ENTRY_FAILURE: 'MENU/UPDATE_MENU_ENTRY_FAILURE', |
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 React, { Component, PropTypes } from 'react' | |
import { DatePickerIOS, Text, TouchableOpacity, View } from 'react-native' | |
import { noop } from 'lodash' | |
import CustomModal from '../CustomModal' | |
import styles from './CustomDatePickerIOS.style' | |
export default class CustomDatePickerIOS extends Component { | |
static propTypes = { | |
visible: PropTypes.bool, |