Skip to content

Instantly share code, notes, and snippets.

@dharavp
Created October 13, 2017 05:46
Show Gist options
  • Save dharavp/01193800c5d450583bc77ddb53e4581d to your computer and use it in GitHub Desktop.
Save dharavp/01193800c5d450583bc77ddb53e4581d to your computer and use it in GitHub Desktop.
React-native project setup steps and important library
To init project as a reactnative
-> react-native init firstProject
To Run Project
Inside of your Project Directory
-> react-native run-android
If error is occuered
Add this line In your Project Directory
-> chmod 755 android/gradlew
-> chmod -R 777 node_modules
Installation of ESLint in sublime3
Step:1 Install eslinst globally with npm
Run this Line in Home Directory -> npm install -g eslint
step:2 Install Package control
Go to packagecontrol.io/installtion
copy content of this.
and add this in to (view-> open console) console and enter
step:3 Install config with npm
sudo npm install --save-dev eslint-config-rallycoding
step:4 Add config file to your project
Open sublime -> open your project -> create new file -> name it .eslintrc
Add this content into it:
{
"extends" : "rallycoding"
}
step:4 Add "linter" to sublime text
ctrl+shift+P
type install package -> do enter
in which install sublimelinter
step:5 Add "eslint" to sublime text
ctrl+shift+P
type install package -> do enter
in which install sublimeLinter-contrib-eslint
Install Redux library
npm install --save redux react-redux
this.state = {
dataSource: new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 })
};
this.setState({
datasource: this.state.dataSource.cloneWithRows(this.props.libraries)
});
Install library for Navigation
npm install --save react-native-router-flux //this will give an error
or
npm install --save react-native-router-flux@3.35.0 // this will also
npm i react-native-router-flux --save // use this one
To convert Object into Array
npm install --save lodash
For the Communication
npm instal --save react-native-communicatios
For Navigation
npm install --save react-navigation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment