-
Check out
react-nativerepo and update template following Christoph's instructions -
Check out
react-native-clirepo, cd into it and runyarnandyarn build. -
Go back up and create a new RN project:
node ./cli/packages/cli/build/index.js init --template=file:///Users/annadoubkova/Workspace/react-native RNTestProject -
Update gradle config in the newly created project following the second part of Christoph's instructions
-
Run start command
REACT_NATIVE_APP_ROOT=../cli node ../cli/packages/cli/build/index.js start
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
| const states = { | |
| DISCOVERY: 'DISCOVERY', | |
| GET_STARTED: 'GET_STARTED', | |
| RENAME: 'RENAME', | |
| TIMEOUT: 'TIMEOUT', | |
| DONE: 'DONE', | |
| ERROR: '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
| // @flow | |
| import * as React from 'react'; | |
| import { Machine, interpret } from 'xstate'; | |
| import { Discovery } from '~/screens/install-devices/discovery'; | |
| import { GetStarted } from '~/screens/install-devices/get-started'; | |
| import { RenameDevice } from '~/screens/install-devices/rename-device'; | |
| import { mapping, type Props as ConnectorProps } from '~/core/domains/installation/devices/mappings'; | |
| import { hiveNavigate } from '~/navigation'; |
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
| protected List<ReactPackage> getPackages() { | |
| List<ReactPackage> packages = new ArrayList<>(Arrays.asList( | |
| new MainReactPackage(), | |
| )); | |
| packages.add(new LazyReactPackage() { | |
| @Override | |
| protected List<ModuleSpec> getNativeModules(ReactApplicationContext reactContext) { | |
| return Arrays.asList( | |
| ModuleSpec.nativeModuleSpec( | |
| ReactNativeFingerprintScannerModule.class, |
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
| # serverless.yml | |
| service: | |
| name: beekeeper-serverless | |
| frameworkVersion: 1.23.0 | |
| plugins: | |
| - serverless-plugin-split-stacks | |
| - serverless-plugin-custom-roles |
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 createLogger from 'redux-mori/dist/createLogger'; | |
| import { createStore } from 'redux-mori'; | |
| import { applyMiddleware } from 'redux'; | |
| const middlewares = []; | |
| if (isDev) { | |
| // you can extend logger options as usual but don’t have to | |
| const logger = createLogger({ | |
| predicate: (getState, action) => !/EFFECT_/.test(action.type), | |
| }); | |
| middlewares.push(logger); |
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
| // just import the same function from a different library | |
| import { combineReducers } from 'redux-mori'; | |
| import userReducer from 'app/containers/User/reducer'; | |
| export default combineReducers({ | |
| user: userReducer | |
| }); |
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, { PropTypes } from 'react'; | |
| import { toJs } from 'mori'; | |
| import { connect } from 'react-redux'; | |
| // write this as a class component to leverage immutability of props for shouldComponentUpdate | |
| const UserComponent = props => { | |
| const user = toJs(props.user); | |
| return (<div>Hi {user.name}!</div>); | |
| } |
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, { PropTypes } from 'react'; | |
| import { toJs } from 'mori'; | |
| import { connect } from 'react-redux'; | |
| // write this as a class component to leverage immutability of props for shouldComponentUpdate | |
| const UserComponent = props => { | |
| const user = toJs(props.user); | |
| return (<div>Hi {user.name}!</div>); | |
| } |
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 { hashMap, merge } from 'mori'; | |
| import { USER_LOADED } from './actions'; | |
| // note that our default state is an empty hashMap - but it can be initialised into any hashMap | |
| export default function userReducer(state = hashMap(), action) { | |
| switch (action.type) { | |
| case USER_LOADED: | |
| return merge(state, action.user); | |
| default: | |
| return state; |
NewerOlder