sábado, 21 de abril de 2018





This is my way to mockup and build/write react native applications.
Steps:

1) PLEASE THINK AGAIN AND AGAIN ON YOUR IDEA.

2) Make a basic mokup of your app. You can use MOCKUP PLUS PROTOTYPER or you can use JUST IN MIND PROTOTYPER


















3)Go into your project folder and install the following libraries:

npm install redux@3.7.2 --save . It's a model layer for react
npm install react-redux@5.0.7 --save . It's a model layer for react
npm install redux-thunk@2.2.0 --save . For asynchronous transactions. Make your actions can return functions... Dispatch.
npm install react-native-router-flux@3.35.0 --save . Deal with navigation.
Optional for maps install: npm react-native-maps --save
If you got any problem with a library you can delete it from package.json and use the command npm prune.
4) Open your folder app with Atom IDE to start work on code. Each time you save your files, the project will reload and show changes by default.

5) Install Nuclide package atom for many development features including debug.

6) Create a components folder into your root app folder, go inside this one, and create another folder called common.

7) Import or create into common folder all .js files that you must have to reuse, like Buttons, Inputs, Header, Footer, Spinners, etc..., Those must have an index.js file that make export * to your project.

8) Create an action folder into your root folder, then inside create an index.js, for each operation or module you must create a new file and import to index.

9) Create a reducers folder into your root folder, then inside create an index.js, for each operation or module you must create a new file and import to index.

5) Open your App.js file and add the following lines:
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import reducers from './reducers';
import LoginForm from './components/LoginForm';

Add This new render, return lines to work with redux:

render() { return ( ); }

0 comentarios:

Publicar un comentario

Subscribe to RSS Feed Sígueme en twitter!