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'm trying out componentFromStream() and was surprised to learn that errors are being swallowed when they bubble up to recompose because it does not subscribe to errors here, only next: notifications.
I'd be happy to submit a pr if others think this would work:
componentWillMount(){// Subscribe to child prop changes so we know when to re-renderthis.subscription=this.vdom$.subscribe({next: vdom=>{this.setState({ vdom })},error: thrown=>{this.setState({ thrown })}})this.propsEmitter.emit(this.props)}// ...render(){if(this.state.thrown){throwthis.state.thrown}else{returnthis.state.vdom}}
The text was updated successfully, but these errors were encountered:
As I remember errors are visible in console (not for all frameworks but for rxjs are)
This will allow to throw error independently of stream framework, and also to intercept error using modern 16 api.
At a first sight I see nothing bad in you suggestion. @wuct others?
I'm trying out
componentFromStream()
and was surprised to learn that errors are being swallowed when they bubble up to recompose because it does not subscribe to errors here, onlynext:
notifications.I'd be happy to submit a pr if others think this would work:
The text was updated successfully, but these errors were encountered: