-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from GantMan/add_basic_navigation
basic navigation added
- Loading branch information
Showing
7 changed files
with
145 additions
and
16 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react' | ||
import { StyleSheet, Text, View } from 'react-native' | ||
|
||
export default class App extends React.Component { | ||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<Text>HIYA!!!!!</Text> | ||
</View> | ||
) | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: '#fff', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}, | ||
}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { StackNavigator } from 'react-navigation' | ||
import LoginScreen from '../Containers/LoginScreen' | ||
|
||
// Manifest of possible screens | ||
const PrimaryNav = StackNavigator({ | ||
LoginScreen: { screen: LoginScreen } | ||
}, { | ||
// Default config for all screens | ||
headerMode: 'none', | ||
initialRouteName: 'LoginScreen' | ||
}) | ||
|
||
export default PrimaryNav |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react' | ||
import * as ReactNavigation from 'react-navigation' | ||
import { connect } from 'react-redux' | ||
import AppNavigation from './AppNavigation' | ||
|
||
// here is our redux-aware our smart component | ||
function ReduxNavigation (props) { | ||
const { dispatch, nav } = props | ||
const navigation = ReactNavigation.addNavigationHelpers({ | ||
dispatch, | ||
state: nav | ||
}) | ||
|
||
return <AppNavigation navigation={navigation} /> | ||
} | ||
|
||
const mapStateToProps = state => ({ nav: state.nav }) | ||
export default connect(mapStateToProps)(ReduxNavigation) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Wherever you build your reducers | ||
import { combineReducers, createStore, applyMiddleware, compose } from 'redux' | ||
import AppNavigation from '../Navigation/AppNavigation' | ||
|
||
const navReducer = (state, action) => { | ||
const newState = AppNavigation.router.getStateForAction(action, state) | ||
return newState || state | ||
} | ||
|
||
export default () => { | ||
/* ------------- Assemble The Reducers ------------- */ | ||
const rootReducer = combineReducers({ | ||
nav: navReducer | ||
}) | ||
|
||
// return store | ||
return createStore(rootReducer) | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1312,6 +1312,10 @@ ci-info@^1.0.0: | |
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" | ||
|
||
clamp@^1.0.1: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/clamp/-/clamp-1.0.1.tgz#66a0e64011816e37196828fdc8c8c147312c8634" | ||
|
||
cli-cursor@^2.1.0: | ||
version "2.1.0" | ||
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" | ||
|
@@ -2038,7 +2042,7 @@ [email protected]: | |
setimmediate "^1.0.5" | ||
ua-parser-js "^0.7.9" | ||
|
||
fbjs@^0.8.4, fbjs@^0.8.9: | ||
fbjs@^0.8.12, fbjs@^0.8.4, fbjs@^0.8.9: | ||
version "0.8.14" | ||
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.14.tgz#d1dbe2be254c35a91e09f31f9cd50a40b2a0ed1c" | ||
dependencies: | ||
|
@@ -2474,6 +2478,10 @@ [email protected]: | |
version "4.2.0" | ||
resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d" | ||
|
||
hoist-non-react-statics@^1.2.0: | ||
version "1.2.0" | ||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb" | ||
|
||
hoist-non-react-statics@^2.2.1: | ||
version "2.3.0" | ||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.0.tgz#ede16318c2ff1f9fe3a025396ba06fd4c44608bb" | ||
|
@@ -4074,6 +4082,12 @@ [email protected]: | |
version "0.1.7" | ||
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" | ||
|
||
path-to-regexp@^1.7.0: | ||
version "1.7.0" | ||
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" | ||
dependencies: | ||
isarray "0.0.1" | ||
|
||
path-type@^1.0.0: | ||
version "1.1.0" | ||
resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" | ||
|
@@ -4339,6 +4353,22 @@ [email protected]: | |
version "2.0.0-beta.3" | ||
resolved "https://registry.yarnpkg.com/react-native-branch/-/react-native-branch-2.0.0-beta.3.tgz#2167af86bbc9f964bd45bd5f37684e5b54965e32" | ||
|
||
[email protected]: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/react-native-dismiss-keyboard/-/react-native-dismiss-keyboard-1.0.0.tgz#32886242b3f2317e121f3aeb9b0a585e2b879b49" | ||
|
||
react-native-drawer-layout-polyfill@^1.3.0: | ||
version "1.3.2" | ||
resolved "https://registry.yarnpkg.com/react-native-drawer-layout-polyfill/-/react-native-drawer-layout-polyfill-1.3.2.tgz#192c84d7a5a6b8a6d2be2c7daa5e4164518d0cc7" | ||
dependencies: | ||
react-native-drawer-layout "1.3.2" | ||
|
||
[email protected]: | ||
version "1.3.2" | ||
resolved "https://registry.yarnpkg.com/react-native-drawer-layout/-/react-native-drawer-layout-1.3.2.tgz#b9740d7663a1dc4f88a61b9c6d93d2d948ea426e" | ||
dependencies: | ||
react-native-dismiss-keyboard "1.0.0" | ||
|
||
react-native-gesture-handler@^1.0.0-alpha.14: | ||
version "1.0.0-alpha.17" | ||
resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.0.0-alpha.17.tgz#1ae4412e1b208d175b34a14931d0635064a92e7b" | ||
|
@@ -4379,6 +4409,12 @@ [email protected]: | |
color "^0.11.1" | ||
lodash "^4.16.6" | ||
|
||
react-native-tab-view@^0.0.65: | ||
version "0.0.65" | ||
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.65.tgz#b685ea3081ff7c96486cd997361026c407302c59" | ||
dependencies: | ||
prop-types "^15.5.8" | ||
|
||
[email protected]: | ||
version "4.1.1" | ||
resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-4.1.1.tgz#9ac75bde77d9243346668c51dca7756775428087" | ||
|
@@ -4474,14 +4510,26 @@ react-native@^0.47.0: | |
xtend ">=4.0.0 <4.1.0-0" | ||
yargs "^6.4.0" | ||
|
||
react-navigation@^1.0.0-beta.11: | ||
version "1.0.0-beta.11" | ||
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-1.0.0-beta.11.tgz#4271edb23cdbcc6eb88602f7fde0a77f0ef7a160" | ||
dependencies: | ||
clamp "^1.0.1" | ||
fbjs "^0.8.12" | ||
hoist-non-react-statics "^1.2.0" | ||
path-to-regexp "^1.7.0" | ||
prop-types "^15.5.10" | ||
react-native-drawer-layout-polyfill "^1.3.0" | ||
react-native-tab-view "^0.0.65" | ||
|
||
react-proxy@^1.1.7: | ||
version "1.1.8" | ||
resolved "https://registry.yarnpkg.com/react-proxy/-/react-proxy-1.1.8.tgz#9dbfd9d927528c3aa9f444e4558c37830ab8c26a" | ||
dependencies: | ||
lodash "^4.6.1" | ||
react-deep-force-update "^1.0.0" | ||
|
||
react-redux@^5.0.2: | ||
react-redux@^5.0.2, react-redux@^5.0.6: | ||
version "5.0.6" | ||
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.6.tgz#23ed3a4f986359d68b5212eaaa681e60d6574946" | ||
dependencies: | ||
|
@@ -4573,7 +4621,7 @@ redux-logger@^2.7.4: | |
dependencies: | ||
deep-diff "0.3.4" | ||
|
||
redux@^3.6.0: | ||
redux@^3.6.0, redux@^3.7.2: | ||
version "3.7.2" | ||
resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b" | ||
dependencies: | ||
|
@@ -5580,7 +5628,7 @@ webidl-conversions@^4.0.0: | |
version "4.0.2" | ||
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" | ||
|
||
"websql@github:expo/node-websql#18.0.0": | ||
websql@expo/node-websql#18.0.0: | ||
version "0.4.4" | ||
resolved "https://codeload.github.com/expo/node-websql/tar.gz/e364fa65146a9e2157a19e5c719e7702c2b6b87a" | ||
dependencies: | ||
|