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

How to cook with RxJS (Armada JS)

How to cook with RxJS (Armada JS)

The trickiest part of learning ReactiveX is switching your mindset to reactive. With so many operators out there learning Rx on your own is often overwhelming. And no, marbles don’t actually help.

But we are living in a reactive world and we can find examples everywhere around us.

In this talk, we will break down the ReactiveX to the basic ingredients and equip you with the approach that will make learning even the hardest operator a child’s play. Writing a reactive code, after all, is no more than telling a story.

Miroslav Jonaš

September 19, 2019
Tweet

More Decks by Miroslav Jonaš

Other Decks in Programming

Transcript

  1. How to
    cook
    with
    RxJS
    @meeroslav

    View Slide

  2. @meeroslav

    View Slide

  3. INCREASE OF APPETITE
    DROOLING
    HUNGER
    WARNING: SIDE EFFECTS
    @meeroslav

    View Slide

  4. Chef
    Miro
    @meeroslav

    View Slide

  5. The Story
    @meeroslav

    View Slide

  6. The best ideas from
    ● OBSERVER PATTERN,
    ● ITERATOR PATTERN
    ● FUNCTIONAL PROGRAMMING
    @meeroslav

    View Slide

  7. FUNCTIONAL
    PROGRAMMING
    @meeroslav

    View Slide

  8. 1. Assemble:
    2 eggs;
    1 teaspoon of butter or oil;
    dash of pepper;
    1/8 teaspoon of salt;
    2. Beat eggs, salt, pepper in a
    bowl.
    3. Heat butter in pan over
    medium-high heat until hot.
    4. Pour in the egg mixture.
    5. Stir mixture until everything
    has thickened.
    6. Serve your meal.
    @meeroslav

    View Slide

  9. serve(
    stirAndHeatInPan(
    heatInPan(butter, melted == true),
    beat(eggs, salt, pepper),
    “mediumHeat”,
    hasTickened == true
    )
    )
    @meeroslav

    View Slide

  10. ITERATOR PATTERN
    @meeroslav

    View Slide

  11. OBSERVER PATTERN
    @meeroslav

    View Slide

  12. @meeroslav

    View Slide

  13. HOT & COLD
    @meeroslav

    View Slide

  14. DEMO GODS
    Photo by
    @zhenhu2424
    @meeroslav
    COOKING TIME
    @meeroslav

    View Slide

  15. RxJS Chef
    @meeroslav

    View Slide

  16. Thank you
    .unsubscribe()
    bit.ly/rxjschef
    bit.ly/armadaslides
    @meeroslav

    View Slide