1.0.0 • Published 8 years ago

react-poop v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Build Status

react-poop

react-poop wraps your stateless functions and the render method of your components into a try/catch block.

When something goes wrong, it shows a 💩 (or the custom handler you provided) so that the tree can still be rendered.

Installation

npm i react-poop --save

Usage

import React from 'react'
import { render } from 'react-dom'
import poop from 'react-poop'

// default

const App = poop()(() => <div>Hello react-poop</div>)

// or
// with a custom handler

const Handler = ({ message }) => <div>{message}</div>
const App = poop(Handler)(() => <div>Hello react-poop</div>)

render(<App />, document.getElementById('app'))

Test

npm test
1.0.0

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago