Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Instructions for creating a RNW component with

1. Install Bit

npm install bit-bin --global

2. Login

bit login

3. Initialize Bit Repo

bit init

4. Add file(s) to new bit component

bit add project/path --id componentId

OR Import all files in a folder as components

bit add src/components/*

5. Import my React Native Web compiler

bit import drumnation.envs/babel-react-native-web --compiler

6. Use compiler to transpile your code from RN to RNW

bit build

7. Commit changes and tag all components with a version number

bit tag --all 1.0.0

OR tag a specific component by id

bit tag componentId 1.0.1

8. Push your changes to all tagged items back to Bitsrc

bit export username.collection

9. Import @bit/react native component into your React.js or React Native project

npm i @bit/drumnation.react-native-web.react-native-web-demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment