This file contains 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
<?php | |
if (! function_exists('currentRoute')) | |
{ | |
/** | |
* Return class when is current route match passed name. | |
* | |
* @param string $name | |
* @param string $htmlClass | |
* @return string |
This file contains 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
import React from "react"; | |
import Navigation from "./navigation"; // instancia do createAppContainer | |
import StatusBarConfig from "./config/StatusBarConfig"; | |
function App() { | |
return <Navigation onNavigationStateChange={StatusBarConfig} /> | |
} | |
export default App; |
This file contains 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
import { StatusBar, Platform } from "react-native"; | |
const getActiveRouteName = navigationState => { | |
if (!navigationState) return null; | |
const route = navigationState.routes[navigationState.index]; | |
if (route.routes) { | |
return getActiveRouteName(route); | |
} |
This file contains 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
# create assets folder in the current project | |
$ mkdir android/app/src/main/assets | |
# create bundle script | |
$ react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ | |
# execute command to run android to create debug apk | |
$ react-native run-android | |
# Or change to android folder |
This file contains 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
"scripts": { | |
"start": "nodemon src" | |
} |