Препарируем RxJS операторы

Галушко Кирилл

Препарируем RxJS операторы

Guy working on laptop

Галушко Кирилл

Andersen logo Superhero Tinkoff logo
RxJS Logo

О чем поговорим

Subscribable

Subscribable interface source screen Aversion Unsubscribable interface source screen

subscribe()

Subscribe source code

lift()

Lift source code

pipe()

Pipe source code

pipeFromArray()

pipeFromArray source code

Операторы

Man
A Serious man movie shot with chalkboard

take()

Take operator source screen Take operator source screen Take operator source screen

Теперь, когда мы разобрались...

Girl with WTF-face

Ctrl+C Ctrl+V

Explosion animation Second explosion animation for skip preventing
We all know that feel meme

Кастомный оператор
Часть 1: Создание

Правила создания

truthyFilter()

Truthy filter operator source code

truthyFilter()

Truthy filter operator source code

Типы возвращаемых значений

MonoTypeOperatorFunction - тип не меняется.

OperatorFunction - тип меняется.

Кастомный оператор
Часть 2: Использование

Использование

Truthy filter illustration Truthy filter operator Using

Кастомный оператор
Часть 3: Тестирование

Тестирование

Test file

Marbles тестирование

Marbles test file

cdrChecking()

cdrChecking operator source code

consoleLog()

ConsoleLog operator source code Result of consolelog

Преобразование lodash в rxjs операторы

Operator from Lodash untility source code

Готовые решения

Excitement

"rxjs-etc" Nicholas Jamieson

"ngx-take-until-destroy" Netanel Basal

takeUntilDestroy usage
RxJS Logo
QR code

Q&A