React Native page debugging tool react-native-vdebug

yarn add react-native-vdebug

import React from 'react'
import { createNativeStackNavigator } from '@react-navigation/native-stack'
import { getRouter } from './config'
import { ErrorBoundary } from '../component/light'
import VDebug, { initTrace, setExternalContext } from 'react-native-vdebug'
import { View } from 'react-native'

const Stack = createNativeStackNavigator()

export default function Router() {
  // Before component Render, perform Proxy Console/Network (Optional)
  initTrace()

  // Context object when the command is executed (Optional)
  setExternalContext('your context')
  return (
    <ErrorBoundary>
      <Stack.Navigator initialRouteName="Index">{getRouter()}</Stack.Navigator>
      <View>
        <VDebug
          // Info panel (Optional)
          info={
   
   { obj: 'your object' }}
        />
      </View>
    </ErrorBoundary>
  )
}

 

 

 

Reference links:

https://www.npmjs.com/package/react-native-vdebug

https://chat.xutongbao.top/ 

Guess you like

Origin blog.csdn.net/xutongbao/article/details/132407477