MichalZalecki / connect-rxjs-to-react

Connect rxjs to React component in Redux style... but without dispatch and constants.
187 stars 27 forks source link

operator :: #6

Closed Gi972 closed 7 years ago

Gi972 commented 7 years ago

Hello,

How do you write this this.subscription = this.context.state$.map(selector).subscribe(::this.setState);

but without the :: ?

Thanks

MichalZalecki commented 7 years ago

Using arrow function expression.

this.subscription = this.context.state$.map(selector).subscribe((s) => this.setState(s));