2018-08-16 21:01:06 +02:00
2018-08-16 00:13:06 +02:00
2018-08-16 00:19:53 +02:00
2018-08-16 21:01:06 +02:00
2018-08-14 10:24:19 +02:00
2018-08-14 10:24:19 +02:00
2018-08-16 21:00:46 +02:00
2018-08-16 20:59:31 +02:00
2018-08-14 10:24:19 +02:00

React Native Debug Console

... and yes I am aware that it is a boring name

React Native Debug Console is an easy to use network and console debug component and modal for react native, written purely in JavaScript

[demo]

screen

Installation

npm install react-native-debug-console

Usage

In order to redirect console logs and network logs to the console, these has to be attached

import {
  DevTool,
  DevToolModal,
  log,
  network,
} from 'react-native-debug-console';

network.attach();
log.attach();

Be aware that this stops logs to be output to the regular console. If that is needed, attach it as log.attach(true)

react-native-debug-console can be used either as a modal, or as a standard component, which can be placed anywhere in you application

const AppWithModal = () => (
  <View>
    <MyOtherContent />
    <DevToolModal />
    <Button
      onPress={show}
    />
  </View>
);

const AppWithComponent = () => (
  <View>
    <MyOtherContent />
    <DevTool />
  </View>
);

Both DevTool and DevToolModal has a includeStackTrace property, which if set will print the stack trace on errors, not just the error message. <DevTool includeStackTrace />

Description
A network and console debug component and modal for react native purely in JavaScript
Readme 3.3 MiB
Languages
JavaScript 100%