Skip to content

jwAndroid/expo-rn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

$ npm install -g expo-cli

$ expo init "project name"

ESLint

$ npm i -D eslint
$ npx eslint --init

eslint-plugin-hook

$ npm install eslint-plugin-react-hooks --save-dev
add eslint hook recomend
  "extends": [
    ...
    "plugin:react-hooks/recommended",
    ...
  ],
add rules
  "rules": {
    "no-unused-vars": "off",
    "@typescript-eslint/no-unused-vars": ["error"],
    ...
  }

Emotion

$ npm install @emotion/react @emotion/native

Moti

$ npm install moti

- install Reanimated-2 :
$ expo install react-native-reanimated

- add the Babel-plugin to babel.config.js :
module.exports = function(api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: ['react-native-reanimated/plugin'],
  };
};

- import Components Moti :
import { MotiView, MotiText, MotiScrollView, MotiSafeAreaView, MotiImage } from 'moti'

Reference-link


Design


Flexbox Froggy