2.2.0 • Published 4 months ago

@sourcetoad/tamagui-react-native v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Tamagui React Native

A starter kit isolated specifically for React Native for Tamagui.

If you use Expo - DO NOT use this. You are welcome to just use tamagui.


Install

npm i --save-dev @sourcetoad/tamagui-react-native
  • Create/edit the assets region of react-native.config.js
module.exports = {
  project: {
    ios: {},
    android: {},
  },
  assets: [
    './node_modules/@tamagui/font-inter/otf'
  ],
};
  • Run npx react-native-asset

  • Add this line to top of babel.config.js

process.env.TAMAGUI_TARGET = 'native'
  • Add to babel.config.js
[
    '@tamagui/babel-plugin',
    {
        components: ['@sourcetoad/tamagui-react-native'],
        config: './tamagui.config.js',
        logTimings: true,
        disableExtraction: process.env.NODE_ENV === 'development'
    }
],
[
    'transform-inline-environment-variables',
    {
        include: 'TAMAGUI_TARGET'
    }
]