├── app ├── actions │ └── index.js ├── components │ └── index.js ├── services │ └── index.js ├── stores │ └── index.js ├── constants │ └── version.js ├── pages │ └── Home │ │ ├── index.js │ │ ├── styles.js │ │ └── Home.js ├── router.js └── index.js ├── .gitignore ├── .babelrc ├── main.js ├── package.json └── README.md /app/actions/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/components/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/services/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/stores/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/constants/version.js: -------------------------------------------------------------------------------- 1 | export default VERSION = "1.0"; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/**/* 2 | .exponent/* 3 | npm-debug.* 4 | exp.json -------------------------------------------------------------------------------- /app/pages/Home/index.js: -------------------------------------------------------------------------------- 1 | import Home from './Home'; 2 | 3 | export default Home; -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native","react-native-stage-0/decorator-support"] 3 | } 4 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | AppRegistry 4 | } from 'react-native'; 5 | import App from './app'; 6 | 7 | AppRegistry.registerComponent('App', () => App); 8 | -------------------------------------------------------------------------------- /app/router.js: -------------------------------------------------------------------------------- 1 | 2 | import { createRouter } from '@exponent/ex-navigation'; 3 | 4 | /* 5 | * Pages 6 | */ 7 | import Home from './pages/Home'; 8 | 9 | const Router = createRouter(() => ({ 10 | home: () => Home 11 | })); 12 | 13 | export default Router; -------------------------------------------------------------------------------- /app/pages/Home/styles.js: -------------------------------------------------------------------------------- 1 | import { 2 | StyleSheet 3 | } from 'react-native'; 4 | 5 | export default StyleSheet.create({ 6 | homeText: { 7 | fontSize: 20, 8 | textAlign: 'center' 9 | }, 10 | container: { 11 | flex: 1, 12 | padding: 10, 13 | justifyContent: 'center', 14 | alignItems: 'center', 15 | }, 16 | version: { 17 | fontSize: 35, 18 | color: 'red', 19 | } 20 | }); -------------------------------------------------------------------------------- /app/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { StatusBar } from 'react-native'; 3 | import { 4 | NavigationProvider, 5 | StackNavigation, 6 | } from '@exponent/ex-navigation'; 7 | import Router from './router'; 8 | class App extends React.Component { 9 | render() { 10 | return ( 11 | 12 | 13 | 14 | 15 | ); 16 | } 17 | } 18 | export default App; 19 | -------------------------------------------------------------------------------- /app/pages/Home/Home.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {View,Text} from 'react-native'; 3 | import styles from './styles'; 4 | import VERSION from '../../constants/version'; 5 | 6 | class Home extends React.Component{ 7 | static route = { 8 | navigationBar: { 9 | title: 'Home', 10 | backgroundColor: '#05A5D1', 11 | tintColor: '#fff', 12 | } 13 | } 14 | render(){ 15 | return( 16 | 17 | Welcome to the React Native Starter with MOBX and Ex-navigation version is 18 | {VERSION} 19 | 20 | ); 21 | } 22 | } 23 | export default Home; 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-starter", 3 | "version": "0.0.1", 4 | "description": "Hello React Native Starter!", 5 | "author": "Berkay Beyaz (http://berkay.beyaz.us/)", 6 | "private": true, 7 | "scripts": { 8 | "start": "node node_modules/react-native/local-cli/cli.js start", 9 | "test": "jest" 10 | }, 11 | "dependencies": { 12 | "@exponent/ex-navigation": "^2.3.0", 13 | "babel-preset-react-native-stage-0": "^1.0.1", 14 | "react": "15.4.1", 15 | "react-native": "0.39.2" 16 | }, 17 | "devDependencies": { 18 | "babel-jest": "18.0.0", 19 | "babel-preset-react-native": "1.9.1", 20 | "jest": "18.0.0", 21 | "react-test-renderer": "15.4.1" 22 | }, 23 | "jest": { 24 | "preset": "react-native" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React Native Starter Pack 2 | React Native starter pack with mobx and ex-navigator also you can working with exponent. 3 | 4 | ## [Mobx](http://mobxjs.github.io/mobx/) 5 | MobX is a battle tested library that makes state management simple and scalable by transparently applying functional reactive programming (TFRP). The philosophy behind MobX is very simple:Anything that can be derived from the application state, should be derived. Automatically.which includes the UI, data serialization, server communication, etc. 6 | 7 | ## [Ex-navigation](https://github.com/exponentjs/ex-navigation) 8 | 9 | A route-centric, batteries-included navigation library for Exponent and React Native that works seamlessly on Android and iOS. 10 | ## Screenshot 11 | 12 | ## Installation 13 | Firstly clone this repo `git clone https://github.com/berkaybeyaz1/react-native-starter.git` then install some dependency with `npm install or yarn install` command and that's it 😁 14 | ### Future Plans 15 | - [ ] CLI tool like angular cli tool (creating, pages, components, actions etc..) ☄ 16 | 17 | ##### - or if you have an idea can you share us on issues 18 | 19 | ## LICENSE 20 | Copyright (c) 2016 © 21 | 22 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 23 | 24 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | --------------------------------------------------------------------------------