├── .gitignore ├── assets ├── ios │ ├── icon.png │ └── index.html ├── shared │ └── README.md └── web │ └── index.html ├── README.md ├── app ├── theme │ ├── constants │ │ └── components.js │ ├── styles │ │ └── TitleBar.js │ ├── styles.js │ └── theme.js ├── routes.js ├── store.js ├── actions.js ├── app.js ├── actions │ └── dogActions.js └── components │ ├── App.jsx │ └── Dogs.jsx └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | server_modules 2 | node_modules 3 | build 4 | .DS_Store -------------------------------------------------------------------------------- /assets/ios/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reapp/reapp-dog-example/HEAD/assets/ios/icon.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Simple reapp example based on http://reapp.io/2015/03/11/Simplify-Flux-with-Immutable-js-and-Fynx/ 2 | -------------------------------------------------------------------------------- /app/theme/constants/components.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // can override reapp-ui/themes/ios/constants/components.js 3 | }; -------------------------------------------------------------------------------- /app/theme/styles/TitleBar.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | self: { 3 | // can override reapp-ui/themes/ios/styles/TitleeBar.js 4 | } 5 | }; -------------------------------------------------------------------------------- /app/routes.js: -------------------------------------------------------------------------------- 1 | export default ({ routes, route }) => 2 | routes(require, 3 | route('app', '/', { dir: '' }, 4 | route('dogs', '/') 5 | ) 6 | ); -------------------------------------------------------------------------------- /app/store.js: -------------------------------------------------------------------------------- 1 | import { createCursorStore } from 'fynx'; 2 | import { fromJS } from 'immutable'; 3 | 4 | module.exports = createCursorStore(fromJS({ 5 | dogIds: [], 6 | dogs: {} 7 | })); -------------------------------------------------------------------------------- /app/theme/styles.js: -------------------------------------------------------------------------------- 1 | import { makeStyles } from 'reapp-ui'; 2 | 3 | var requirer = (name) => require('./styles/' + name); 4 | 5 | module.exports = makeStyles(requirer, [ 6 | 'TitleBar' 7 | ]); -------------------------------------------------------------------------------- /app/actions.js: -------------------------------------------------------------------------------- 1 | import { createAsyncActions } from 'fynx'; 2 | 3 | export default createAsyncActions([ 4 | 'loadDogs', 5 | 'reverseDogs' 6 | ]); 7 | 8 | // Required here so actions are bundled with the app 9 | import dogActions from './actions/dogActions'; -------------------------------------------------------------------------------- /assets/shared/README.md: -------------------------------------------------------------------------------- 1 | Files in this repo will be copied into your build folder 2 | no matter what platform you target with `reapp build`. 3 | 4 | If you don't want them to be copied, place them outside of 5 | this folder and require them from somewhere in your app. -------------------------------------------------------------------------------- /app/app.js: -------------------------------------------------------------------------------- 1 | // needed for now, see issue #1 in reapp-ui 2 | import 'reapp-ui'; 3 | 4 | // import our theme 5 | import './theme/theme'; 6 | 7 | // routes & run 8 | import Router from 'reapp-routes/react-router'; 9 | import Routes from './routes'; 10 | 11 | Router(Routes); -------------------------------------------------------------------------------- /app/theme/theme.js: -------------------------------------------------------------------------------- 1 | import UI from 'reapp-ui'; 2 | import iOS from 'reapp-ui/themes/ios'; 3 | 4 | // use the ios base stylesheet 5 | import 'reapp-ui/themes/ios/stylesheets'; 6 | 7 | // custom constants 8 | UI.addConstants( 9 | iOS.constants.base, 10 | iOS.constants.components, 11 | require('./constants/components') 12 | ); 13 | 14 | // custom styles 15 | UI.addStyles( 16 | iOS.styles, 17 | require('./styles') 18 | ); 19 | 20 | // default animations 21 | UI.addAnimations( 22 | iOS.animations 23 | ); 24 | 25 | module.exports = UI.getTheme(); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Your Name Here", 3 | "name": "reapp-dog-example", 4 | "repository": "", 5 | "description": "", 6 | "version": "1.0.0", 7 | "main": "./app/app.js", 8 | "reapp": "0.8", 9 | "scripts": { 10 | "test": "", 11 | "start": "reapp run" 12 | }, 13 | "dependencies": { 14 | "fynx": "^1.6.0", 15 | "immutable": "^3.6.4", 16 | "react": "0.13.1", 17 | "react-router": "git+https://github.com/reapp/react-router#1d00e252", 18 | "reapp-component": "^1.0.0", 19 | "reapp-platform": "^1.0.0", 20 | "reapp-request": "^0.2.0", 21 | "reapp-routes": "^0.10.0", 22 | "reapp-ui": "^0.11.0" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /assets/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |