Is Piping Mandatory for Single Operator

Viewed 218

Should I always use piping in RxJs 6 even if there is just one operator? For example:

observableOf([1, 2, 3])
 .pipe(
    map(num => num * 2)
)

Can I write this without piping:

observableOf([1, 2, 3])
  .map(num => num * 2);

Is this OK for a pipe with just one operator or it is deprecated?

1 Answers
Related