rnvconsole

0.3.0 • Public • Published

RNVConsole

vConsole for react native, inspired by vconsole & vconsole-react-native. Debugger on top of screen. Have a try in expo https://snack.expo.io/SklJHMS3S

Features

  1. console[log, warn, error, info] in Log Panel.
  2. exec Command to show message.
  3. Network request list & detail.
  4. Customized Version Info you want to show.

Install

npm install rnvconsole

Usage

// Options
import RN from 'react-native'
import Native from '../native' // your own Module

// Show app information in INFO panel
const INFO = {
  version: '1.0.0',
  test_version: '4',
  message: 'test xxx features'
}
const options = {
  info: INFO,
  // global Object can be called in Command Input
  global: {
    rn: RN
    native: Native
  }
}

const RNVConsole = require('rnvconsole').showLogWhenDev(options)

// in render function
render() {
  return (
    <View>
      {RNVConsole} // add RNVConsole somewhere in JSX
      <View></View>
    </View>
  )
}

Examples

Log Panel

Command

Object defined in global options can be call in command. Such as react-native module or your native function.

Network Panel

Info Panel

Dev Button

Package Sidebar

Install

npm i rnvconsole

Weekly Downloads

2

Version

0.3.0

License

MIT

Unpacked Size

32.4 kB

Total Files

8

Last publish

Collaborators

  • fwon