Skip to content

fwon/RNVConsole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

vConsole for react native

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published