You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.
I just had a play around too after seeing their <ErrorBoundry> wrapper and came up with something like this, similar to the spinnerWhileLoading example from docs
Edit: not proposing as part of the lib, just one way to do it yourself :)
constshowErrorMessage=ErrorComponent=>compose(lifecycle({componentDidCatch(error,errorInfo){this.setState({ error, errorInfo })},}),branch(props=>props.error,renderComponent(ErrorComponent)),)/////importshowErrorMessagefrom'../utils'constWillThrow=props=><div>{props.undefined[0]}</div>constErrorMessage=()=><h1>Something went wrong.</h1>constApp=props=><div>
App
<WillThrow/></div>exportdefaultcompose(showErrorMessage(ErrorMessage))(App)
https://facebook.github.io/react/blog/2017/07/26/error-handling-in-react-16.html
Dear recomposers lets think about this feature and may be an enhancer we could provide.
The text was updated successfully, but these errors were encountered: