Skip to content

Instantly share code, notes, and snippets.

@drumnation
Created March 3, 2019 17:19
Show Gist options
  • Select an option

  • Save drumnation/978de85f1ae69127d90a7bb677994e0f to your computer and use it in GitHub Desktop.

Select an option

Save drumnation/978de85f1ae69127d90a7bb677994e0f to your computer and use it in GitHub Desktop.
Instructions for creating a RNW component with Bitsrc.io

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/*

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