reactotron hello world

This commit is contained in:
Eric Vicenti
2018-07-12 11:28:46 -07:00
parent c4b84f1d66
commit 655453aed3
4 changed files with 53 additions and 5 deletions

View File

@@ -16,6 +16,9 @@ import {
StatusBar,
View,
} from 'react-native';
import Reactotron from 'reactotron-react-native';
import { SafeAreaView, createStackNavigator } from 'react-navigation';
import CustomTabs from './CustomTabs';
@@ -39,6 +42,11 @@ import TabsWithNavigationFocus from './TabsWithNavigationFocus';
import TabsWithNavigationEvents from './TabsWithNavigationEvents';
import KeyboardHandlingExample from './KeyboardHandlingExample';
Reactotron.configure()
.useReactNative()
.connect();
console.tron = Reactotron;
const ExampleInfo = {
SimpleStack: {
name: 'Stack Example',
@@ -340,7 +348,9 @@ const AppNavigator = createStackNavigator(
}
);
export default AppNavigator;
const App = () => <AppNavigator persistenceKey="yes" />;
export default App;
const styles = StyleSheet.create({
item: {

View File

@@ -19,7 +19,8 @@
"react-navigation": "link:../..",
"react-navigation-header-buttons": "^0.0.4",
"react-navigation-material-bottom-tabs": "0.1.3",
"react-navigation-tabs": "^0.5.1"
"react-navigation-tabs": "^0.5.1",
"reactotron-react-native": "^2.0.0"
},
"devDependencies": {
"babel-jest": "^22.4.1",

View File

@@ -4734,6 +4734,10 @@ minizlib@^1.1.0:
dependencies:
minipass "^2.2.1"
mitt@^1.1.2:
version "1.1.3"
resolved "https://registry.yarnpkg.com/mitt/-/mitt-1.1.3.tgz#528c506238a05dce11cd914a741ea2cc332da9b8"
mixin-deep@^1.2.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe"
@@ -5446,6 +5450,13 @@ qs@6.5.2, qs@^6.4.0, qs@^6.5.0, qs@^6.5.1, qs@~6.5.1:
version "6.5.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
query-string@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.1.0.tgz#01e7d69f6a0940dac67a937d6c6325647aa4532a"
dependencies:
decode-uri-component "^0.2.0"
strict-uri-encode "^2.0.0"
querystring@0.2.0, querystring@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
@@ -5758,9 +5769,9 @@ react-navigation-deprecated-tab-navigator@1.3.0:
dependencies:
react-native-tab-view "^0.0.77"
react-navigation-drawer@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-0.3.0.tgz#641007213f0f1e1b55a0a4bb64d71df07b3e7208"
react-navigation-drawer@0.4.3:
version "0.4.3"
resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-0.4.3.tgz#c04c94e2429b7e724801af05bd0a93a79cb27f71"
dependencies:
react-native-drawer-layout-polyfill "^1.3.2"
@@ -5871,6 +5882,18 @@ react@^16.0.0:
object-assign "^4.1.1"
prop-types "^15.6.0"
reactotron-core-client@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/reactotron-core-client/-/reactotron-core-client-2.0.0.tgz#0229e7938ed17104b846c50295ae8cb40557e83c"
reactotron-react-native@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/reactotron-react-native/-/reactotron-react-native-2.0.0.tgz#54d1119c6640b7e8c6c7383e482474d4cef11016"
dependencies:
mitt "^1.1.2"
prop-types "^15.5.10"
reactotron-core-client "^2.0.0"
read-chunk@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/read-chunk/-/read-chunk-2.1.0.tgz#6a04c0928005ed9d42e1a6ac5600e19cbc7ff655"
@@ -6570,6 +6593,10 @@ stream-parser@~0.3.1:
dependencies:
debug "2"
strict-uri-encode@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
string-length@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed"

View File

@@ -265,6 +265,16 @@ export default function createNavigationContainer(Component) {
return;
}
console.tron &&
console.tron.display({
name: 'Navigation',
preview: 'Initial State',
value: {
initialState: startupState,
initialAction: this._initialAction,
},
});
this.setState({ nav: startupState }, () => {
_reactNavigationIsHydratingState = false;
dispatchActions();