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
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache |
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
Author: inspireUI | |
Website: inspireui.com | |
- Should be use PureComponent to avoid re-render many times --> https://reactjs.org/docs/react-api.html#reactpurecomponent | |
- Seperate Container file and Component file --> https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0 | |
- Avoid use .bind when handle function --> https://stackoverflow.com/a/32192892/6622971 | |
- Don’t use arrow functions in your render methods --> onPress={(e) => this.handlePress(e)} --> only use when need pass params to handle, or | |
export default ({deleteItem, item}) => { | |
const _onDeleteTap(){ | |
deleteItem(item.id) |
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
{ | |
"parser": "babel-eslint", | |
"extends": ["airbnb", "prettier"], | |
"parserOptions": { | |
"ecmaFeatures": { | |
"experimentalObjectRestSpread": true, | |
"jsx": true, | |
"modules": true | |
}, | |
"ecmaVersion": 7, |
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
{ | |
"printWidth": 80, | |
"parser": "babylon", | |
"useTabs": false, | |
"tabWidth": 2, | |
"singleQuote": true, | |
"jsxBracketSameLine": true, | |
"arrowParens": "always", | |
"insertPragma": true, | |
"semi": false, |
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
/** | |
* Please install https://github.com/expo/babel-preset-expo to use decorators javascript | |
* And add to .babelrc | |
*/ | |
{ | |
"presets": ["babel-preset-expo"], | |
"env": { | |
"production": { | |
"plugins": ["transform-remove-console"] | |
} |
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
/** | |
* Import with file .js | |
* example: import { Drawer, SideMenu } from '@components'; | |
*/ | |
{ | |
"name": "@components" | |
} |
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
Show hidden characters
{ | |
"presets": ["module:metro-react-native-babel-preset"], | |
"env": { | |
"production": { | |
"plugins": [ | |
"transform-remove-console", | |
["@babel/plugin-proposal-decorators", { "legacy": true }] | |
] | |
}, | |
"development": { |