Skip to content

A starter kit isolated for Tamagui meant for React Native only.

License

Notifications You must be signed in to change notification settings

sourcetoad/tamagui-react-native

Repository files navigation

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'
    }
]

About

A starter kit isolated for Tamagui meant for React Native only.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published