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-crashalert

v3.0.5

Published

Library of react native components which allow reporting steps leading to an application crash

Downloads

4

Readme

Crashalert

As a mobile app developer, you’ve likely faced your own unique challenges in detecting, reproducing and debugging run-time crashes in React Native applications. Of course we need a crash analyzer tool that can track these crashes.

What is Crashalert?

This is a reporter that stores user action steps and runtime crashes info that you can analyze on Crashlyzer with a detailed specification of the tracked crashes. You no longer need to change existing code, you just need to import react-native-crashalert components in your js classes rather than react-native.

Supported Versions

Version 3.0.5 supports react-native >= 0.52.0

Platforms

Crashalert supports both the platforms android and iOS.

Installation

$ yarn react-native-crashalert or npm install --save react-native-crashalert

Demo

How to analyze the crashes?

To analyze your app crashes, you should follow Node server and Web client installation here

NOTE: Please follow the link here for the complete installation guide of Crashlyzer.

Basic usage

First of all, you'll need to add following code in your app.js or any top hierarchy component in constructor or componentWillMount() method. This is required configuration for crash reporter.


import { CrashReporter } from 'react-native-crashalert'

CrashReporter.setConfiguration({
hostURL: 'http://localhost:8000', // Replace this URL with your Server base url, in my case I have setup the node server on my machine itself using docker container
enableReporter: true  // pass false here if you don't want to enable reporting the crashes
});

NOTE: In case localhost url is not working in any platform android/iOS then you need to replace the value of hostURL to your machine's local IP Address in setConfiguration method.

Sample

You can simply try the following sample code :


// Import the component 'react-native-crashalert' module
import {Button} from 'react-native-crashalert';

// Within your render function
<Button style={styles.button} onPress={()=> this.pressLogin()}>
LOG IN
</Button>

// Adding your styles...
var styles = StyleSheet.create({
button: {
height:35,
backgroundColor: '#F57B20',
alignSelf:'center',
marginTop:10,
width:100
}

});

NOTE : Following are some additional props which might be used to pass manual information associated with the component otherwise the default information of the component will get passed.

Example:

The example app RNCrashExamples demonstrated the use of our crash reporter library. It is also having some additional features i.e. Eslint, Code-Push, React-Navigation and Redux are integrated. You need to add your code-push keys for android and iOS in their respective mapping files, you can follow the inline link of code-push for more details. The code-push is optional in the example app for debug mode.

The components which can be used:

  • Button
  • TouchableOpacity
  • TouchableHeighlight
  • TouchableWithoutFeedback
  • TouchableNativeFeedback

Additional props

  • searchText : To get the searched text on the TextInput component.(NOTE : While using TextInput component, you need to pass the text value in this field)
  • actionOn : To associate extra information related to the component used.
  • textStyle: To give a custom style of Text

Troubleshoot

If you experience the following issue in android while building the example app:

ENOENT: no such file or directory, open '/Users/macmini33/Desktop/demo/RNCrashExamples/android/app/build/intermediates/assets/debug/CodePushHash'

Fix: You need to create two (assets and debug) folders to the following path:

rootDir -> android -> app -> build -> intermediates -> assets -> debug

License

MIT

Contributors

Arpit Khandelwal, Akhilesh Mourya, Rituraj Mandloi