-
Notifications
You must be signed in to change notification settings - Fork 1
Iniciando Projeto
react-native init projeto
yarn add reactotron-react-native --dev
yarn add reactotron-redux
import { NativeModules } from 'react-native'; import Reactotron from 'reactotron-react-native'; import { reactotronRedux } from 'reactotron-redux';
if (DEV) { const scriptURL = NativeModules.SourceCode.scriptURL; scriptHostname = scriptURL.split('://')[1].split(':')[0]; const tron = Reactotron .configure({ host: scriptHostname }) .useReactNative() .use(reactotronRedux()) .connect(); tron.clear(); console.tron = tron; }
import './config/ReactotronConfig';
No sublimetext instale: SublimeLinter, SublimeLinter-contrib-eslint, ESLint
npm info "eslint-config-airbnb@latest" peerDependencies
yarn install
yarn add babel-eslint eslint-config-airbnb eslint-plugin-react-native --dev
ou instale todos*:
yarn add eslint eslint-config-airbnb eslint-plugin-jsx-a11y eslint-plugin-react-native eslint-plugin-import babel-eslint eslint-plugin-react --dev
{
"parser": "babel-eslint",
"env": {
"browser": true,
"jest": true
},
"plugins": [
"react-native",
"jsx-a11y",
"import"
],
"extends": [
"airbnb",
"plugin:react-native/all"
],
"rules": {
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx"] }],
"global-require": "off",
"no-console": "off",
"import/prefer-default-export": "off"
},
"settings": {
"import/resolver": {
"babel-module": {}
}
},
"globals": {
"__DEV__": true
}
}
yarn add prop-types
import PropTypes from 'prop-types';
yarn add babel-plugin-module-resolver --dev
{
"presets": ["react-native"],
"plugins": [
[
"module-resolver",
{
"root": ["./src"],
"extensions": [".js", ".ios.js", ".android.js"]
}
]
]
}
"setting": {
"import/resolver": {
"babel-module": {}
}
}
react-native start -- --reset-cache
yarn add eslint-import-resolver-babel-module
ou
yarn add eslint-plugin-import eslint-import-resolver-babel-module
yarn add react-native-vector-icons
E para link a nova biblioteca
react-native link react-native-vector-icons
import Icon from 'react-native-vector-icons/FontAlvo';