O'Reilly logo

Mastering Reactive JavaScript by Erich de Souza Oliveira

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What is a transducer?

Transducers are composable algorithmic transformations; they provide a way to compose your operators to create a new one. They are independent of the input source and the output, and for this reason they can be applied not only to observables, but also to arrays, streams, and collections.

The transducers let you describe the operations you want to apply to an input source, this way you can create a pipeline of operations to be applied to them, without ever creating any intermediate aggregation.

You probably remember from previous chapters that, every time we apply an operator to an observable we create a new observable, so if we apply two operators to an observable we will create two extra observables, if we apply three ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required