Skip to content

Instantly share code, notes, and snippets.

import React, { useState, useEffect } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { Text, StyleSheet } from 'react-native'
import BackgroundPage from '../../components/global/layout/BackgroundPage'
import { initialiseApplication } from '../../redux/actions/application.actions'
import background from '../../../assets/bg_abstract_01.jpg'
const SceneDataCheck = ({ initApp }) => {
const [timestamp] = useState(Date.now())
import {
INIT_APPLICATION,
} from '../../actions/application.actions'
import manifest from '../../../../app.json'
const { expo: { name, version: manifestVersion } } = manifest
const applicationMiddleware = ({ getState }) => (next) => (action) => {
switch (action.type) {
case INIT_APPLICATION: {
import React from 'react'
import { View, StyleSheet } from 'react-native'
import PropTypes from 'prop-types'
import BackgroundPage from '../../components/global/layout/BackgroundPage'
import RockPaperScissorsLizardSpock from '../../components/other/RockPaperScissorsLizardSpock'
import IconButton from '../../components/global/ui/IconButton'
import backgroundImage from '../../../assets/bg_abstract_02.jpg'
const SceneGameHome = ({ navigation }) => (
<BackgroundPage background={backgroundImage}>
import React from 'react'
import PropTypes from 'prop-types'
import {
StyleSheet,
Text,
View,
TouchableOpacity,
} from 'react-native'
const IconButton = ({
import React from 'react'
import { Image, StyleSheet } from 'react-native'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { userLogout } from '../../redux/actions/user.actions'
import TextButton from '../../components/global/ui/TextButton'
import BackgroundPage from '../../components/global/layout/BackgroundPage'
import backgroundImage from '../../../assets/bg_abstract_02.jpg'
import logo from '../../../assets/game_logo.png'
// ...
import { connect } from 'react-redux' // #1 grab connect from react-redux
// ...
const SceneSplash = ({ isUserLoggedIn, navigation }) => {
const navigationTarget = isUserLoggedIn ? 'Home' : 'Login' // #2 determine path
useFocusEffect(
useCallback(() => {
const delayedNavigation = setTimeout(() => {
import React from 'react';
import { StatusBar } from 'react-native'
import { Provider } from 'react-redux'
import { PersistGate } from 'redux-persist/integration/react'
import { enableScreens } from 'react-native-screens'
import store, { persistor } from './src/redux/store'
import Navigation from './src/navigation'
import SceneAppLoading from './src/scenes/auth/sceneAppLoading'
enableScreens()
import { applyMiddleware, createStore } from 'redux'
import { persistStore, persistReducer } from 'redux-persist'
import { AsyncStorage } from 'react-native'
import rootReducer from './reducers/rootReducer'
import middleware from './middleware'
const persistConfig = {
key: 'root',
storage: AsyncStorage,
}
import React, { useState } from 'react'
import {
View, Text, TextInput, StyleSheet,
} from 'react-native'
import { connect } from 'react-redux'
import PropTypes from 'prop-types'
import { userLogin } from '../../redux/actions/user.actions'
import BackgroundPage from '../../components/global/layout/BackgroundPage'
import backgroundImage from '../../../assets/bg_abstract_01.jpg'
import TextButton from '../../components/global/ui/TextButton'
import React from 'react'
import PropTypes from 'prop-types'
import {
StyleSheet,
Text,
View,
TouchableOpacity,
} from 'react-native'
const TextButton = ({