npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-in-app-debugger

v1.0.69

Published

This library's main usage is to be used by Non-Technical testers during UAT, SIT or any testing phase.

Downloads

498

Readme

react-native-in-app-debugger

This library's main usage is to be used by Non-Technical testers during UAT, SIT or any testing phase.

ezgif-3-1cb92b8367

Usage :

import React from 'react';
import {Text, TouchableOpacity, View} from 'react-native';
import {version} from './package.json';
import InAppDebugger from 'react-native-in-app-debugger';

const variables = {
  url: 'https://staging.sample.com',
};
export default () => (
  <>
    <View
      style={{
        alignItems: 'center',
        justifyContent: 'center',
        flex: 1,
        gap: 10,
      }}>
      <TouchableOpacity
        onPress={() => {
          fetch('https://reactnative.dev/movies.json');
        }}>
        <Text>Success</Text>
      </TouchableOpacity>
      <TouchableOpacity
        onPress={() => {
          fetch('https://reactnative.dev/wrong-url', {
            headers: {key: 'value'},
          });
        }}>
        <Text>Error</Text>
      </TouchableOpacity>
      <TouchableOpacity
        onPress={() => {
          fetch('https://swapi.dev/api/planets/?format=wookiee');
        }}>
        <Text>Heavy</Text>
      </TouchableOpacity>
    </View>
    <InAppDebugger version={version} env="staging" variables={variables} labels={['branch: master']} />
  </>
);

Call InAppDebugger component on top most component, then a floating debugger will appear.

Installation

You can declare this in your package.json without the need to specify version

"react-native-in-app-debugger": "latest",

because we are committed to ensure that no breaking changes for every released version and all releases will be backward compatible. Therefore, you will enjoy latest version hassle free.

Properties

All FlatList props should work plus props mentioned below

| Prop | Type | Description | Default | Required | | ----------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------- | | env | string | any value set here will be shown in the floating debugger panel | | Optional | | variables | Plain Old JavaScript Object object {} | Key-Value Plain Old JavaScript Object. Normal use case is to show API URL endpoints, environment variable values or any variables you want to debug on run time | | Optional. If set, the debugger will show a dedicated tab for variables when open in full screen mode | | labels | Array of strings | Array of strings you want to show of the floating debugger pill. For each strings in the array will eb displayed as a single line in the floating debugger pill | | Optional | | maxNumOfApiToStore | integer | Number of APIs to be kept. Too much API might make the whole app lag, therefore need to trade off. Suggested value is 50 | | Optional. If not set, all APIs will be kept forever | version | string | Any string passed here will be shown in debugger's floating panel. | | Optional. If not supplied, version number will taken automatically using React Native Device Info library. But if Device Info library is not installed, then no version will be shown if this prop is not passed. interceptResponse | function | Callback function when receive response from any API. | | Optional

Integration with Third Party Library

React Native Device Info (https://www.npmjs.com/package/react-native-device-info)

If this library is installed, the floating debugger can automatically show version number, device model, OS version

React Native Clipboard (https://www.npmjs.com/package/@react-native-clipboard/clipboard)

If this library is installed, when user expand any selected API, there will be a Copy button available. Make it very easy for non-techincal tester or user want to copy and paste the API request and response details.

React Native Async Storage (https://www.npmjs.com/package/@react-native-async-storage/async-storage)

If this library is installed, the blacklist will be persisted