An open API service indexing awesome lists of open source software.

https://github.com/cometkim/rescript-react-error-boundary

ReScript binding for react-error-boundary
https://github.com/cometkim/rescript-react-error-boundary

Last synced: 4 months ago
JSON representation

ReScript binding for react-error-boundary

Awesome Lists containing this project

README

          

# rescript-react-error-boundary

[![NPM Package](https://img.shields.io/npm/v/rescript-react-error-boundary)](https://www.npmjs.com/package/rescript-react-error-boundary)
[![LICENSE - MIT](https://img.shields.io/github/license/cometkim/rescript-react-error-boundary)](#LICENSE)

ReScript binding for [react-error-boundary](https://github.com/bvaughn/react-error-boundary)

## Installation

```bash
yarn add rescript-react-error-boundary
```

And add it into your `bsconfig.json`

```json
"bs-dependencies": [
"rescript-react-error-boundary"
]
```

## Example

```res
open RescriptReactErrorBoundary

@react.component
let make = () => {



Js.Console.error(
switch (error->Js.Exn.message) {
| Some(message) => message
| None => "Unknown error occured while rendering"
},
)
}>



}
```

## LICENSE

MIT