Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rx.js Workshop Intro

Rx.js Workshop Intro

Nikita Galkin

March 03, 2018
Tweet

More Decks by Nikita Galkin

Other Decks in Programming

Transcript

  1. Верю, что: ▰ Любая проблема должна решаться на нужно уровне

    ▰ Сложности не в технологиях, сложности в людях ▰ Проблемы надо обсуждать, идеи – продавать, а решения – демонстрировать 2 Никита Галкин
  2. 1. Understand RxJS concept 2. Create observables 3. Filter Events

    Based on a Predicate with RxJS filter 4. Inspect the Behavior of Operators with RxJS do 5. Filter Events with RxJS Operators take, first, and skip 6. Control the Output of Values with RxJS Operator with LatestFrom 7. Drop and Delay Observable Emissions with RxJS debounce Программа 3
  3. 8. Handle Errors with RxJS catch 9. Resubscribe to an

    Observable on Error with RxJS retry 10. Repeat the Execution of an Observable with RxJS repeat 11. Hot observables 12. Connectable observables 13. More operators and conclusion Программа 4
  4. Imperative vs Declarative 7 Telling the computer how to do

    something, and as a result what you want to happen will happen. Imperative programming Telling the computer what you would like to happen, and let the computer figure out how to do it. Declarative programming 5
  5. Advantages of Declarative Programming 9 • Minimizes mutability • Reduces

    state side-effects • More understandable code • More scalable
  6. Functional programming 10 Functional programming is a programming paradigm that

    treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data
  7. Functional programming 11 const numbers = [1, 2, 3, 4,

    5, 6] const doubled = numbers.map(x => x*x) const sum = doubled.reduce((a,b) => a +b))
  8. FRP 12 Functional reactive programming (FRP) is a programming paradigm

    for reactive programming using the building blocks of functional programming
  9. FP VS FRP 13 FP ▰ Style SYNCHRONOUS ▰ Single

    – Function ▰ Multiple – Enumerable FRP ▰ Style ASYNCHRONOUS ▰ Single – Promise ▰ Multiple – Observable
  10. • Documentations ◦ http://reactivex.io/rxjs/ ◦ https://www.learnrxjs.io • Demos ◦ http://reactive.how

    ◦ http://rxmarbles.com ◦ https://rxviz.com • Other ◦ https://github.com/ichpuchtli/awesome-rxjs Links 15