• Stars
    star
    372
  • Rank 114,858 (Top 3 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple and reusable React-Native error boundary component ๐Ÿ›

react-native-error-boundary

Build Status Codecov Npm Version Npm Downloads

A simple and reusable React-Native error boundary component ๐Ÿ›

Install

yarn add react-native-error-boundary

Documentation

API

ErrorBoundary

These are the props that you can pass to the ErrorBoundary component:

Property Type Required Default
Children React.Children true
FallbackComponent React.Component false FallbackComponent
onError Function false

Children

Any children that can throw an error.

FallbackComponent

The fallback component that will be rendered after catching an error. By default the library comes with a built-in component.

onError

A function that receives two arguments:

  • error: The error catched by the component.
  • stackTrace: The stacktrace of the error.
onError(error: Error, stackTrace: string): void

FallbackComponent

These are the props that the FallbackComponent receives:

Property Type Default
error Error
resetError Function

error

The error object.

resetError

A function to reset the error state. You'll want to call this function to recover from the error state.

resetError(): void

Demo

react-native-error-boundary

More Repositories

1

gitmoji

An emoji guide for your commit messages. ๐Ÿ˜œ
TypeScript
15,681
star
2

gitmoji-cli

A gitmoji interactive cli tool for using emojis on commits. ๐Ÿ’ป
JavaScript
4,615
star
3

materialshell

A material design theme for your terminal. โœจ
Shell
825
star
4

starterkit

A Front End development Gulp.js based workflow. ๐Ÿš€
JavaScript
88
star
5

hyper-materialshell

A material design theme for Hyper based on materialshell. โœจ
JavaScript
70
star
6

carloscuesta.me

The source of my website ๐ŸŒ
TypeScript
48
star
7

dotfiles

macOS preferences and developer environment. ๐Ÿ’ป
Shell
44
star
8

generator-starterkit

Yeoman that scaffolds out a front end starterkit. ๐Ÿ“ฆ
JavaScript
30
star
9

react-native-layout-debug

React native layout debugger. ๐Ÿ”
JavaScript
22
star
10

sprinkles-syntax

A sprinkled dark syntax theme with vibrant pops of colors.
Less
20
star
11

sprinkles-vscode

A sprinkled syntax theme with vibrant pops of colors for VSCode.
TypeScript
8
star
12

resesif

Resesif is a dark color scheme for Sublime Text.
6
star
13

carloscuesta

Carlos Cuesta โ€“ GitHub Overview
5
star
14

monorepo-example

A JavaScript monorepo example using Yarn Workspaces and Lerna
JavaScript
5
star
15

atom-setup

Configuration, packages and settings. โš›๏ธ
4
star
16

sublime-text-setup

Carlos Cuesta Sublime Text developer setup.
JavaScript
3
star
17

n26-github-actions-demo

JavaScript
1
star
18

.github

Default GitHub community files for my repos
1
star
19

ghost-theme

Carlos Cuesta Ghost blog Theme
HTML
1
star
20

codegenerators-demo

A demo repository that contains generators you can play with ๐Ÿ•น
JavaScript
1
star