Created
May 6, 2019 08:51
-
-
Save dayaki/0d7f6b2f0df291cff3dd8b307ccab241 to your computer and use it in GitHub Desktop.
Building a debug apk with React Native Navigation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
react-native bundle --dev false --platform android --entry-file index.js --bundle-output ./android/app/src/main/assets/index.android.bundle --assets-dest ./android/app/src/main/res | |
cd android | |
./gradlew app:assembleDebug |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use react-native-svg-transformer to import svgs in to your code. Once you've set that up, you'll be able to do:
import ProfileIcon from './images/profile.svg'
You can then use ProfileIcon as a component.
To control the colour, edit the svg file and change the fill or stroke attributes to "currentColor" (so <polygon fill="currentColor" ...>). You can then set the color style on your svg element and it'll use that colour: <ProfileIcon style={{ color: '#f80' }}/>