Reactive Programming from Scratch (JavaScript) - Ep3

Поділитися
Вставка
  • Опубліковано 7 гру 2018
  • Let's build a reactive JavaScript library, inspired by RxJS, from scratch.
    ⭐️ Support the channel on Patreon:
    / christopherokhravi
    ► Playlist:
    • Reactivity from Scratch

КОМЕНТАРІ • 29

  • @mountassirbillah-guitar
    @mountassirbillah-guitar 2 місяці тому +1

    We need the next the next: {}, of this series 😂 great content

  • @KGcodes
    @KGcodes 5 років тому +5

    This is a great idea for learning how reactive frameworks work and getting better at using them 👍

  • @Russ_Paul
    @Russ_Paul 3 роки тому

    For someone who wasn't overly familiar with RxJS, your pipe implementation seems to be spot on!!
    const ob = new Observable(
    subscriber => {
    subscriber.next(5)
    subscriber.next(10)
    subscriber.next(-8)
    }
    )
    const transforms = ob.pipe(
    map(x => x * 2),
    map(Math.abs),
    map(x => x + 10),
    map(x => `Number is ${x}`)
    )
    transforms.subscribe(console.log)
    // Number is 20
    // Number is 30
    // Number is 26

  • @trucidagatti
    @trucidagatti 5 років тому +3

    Is there any chance we could have another episode of "Reactive Programming from Scratch"?

  • @andysong6796
    @andysong6796 5 років тому

    Thank you very much for this great series that builds rxjs-like API from zero! I'll recommend your channel to all of my friends.
    I wrote my fromEvent function like this:
    fromEvent: (element, type) => {
    const o = new Observable()
    element.addEventListener(type, o.emit.bind(o))
    return o
    },
    PS: The ramda-series is awesome too, thanks a lot!

  • @nderezic
    @nderezic 5 років тому +1

    If a logger could be attached to a human brain with logging level set to "extremely verbose", this video would be the result! Kudos for great work! ;)

  • @jeronimocarrizo5855
    @jeronimocarrizo5855 5 років тому

    Thank you so much for this short course, It help me a lot to understand more in deep Rx Programming! thanks again!

  • @BarunKharel
    @BarunKharel 4 роки тому +1

    I recommend your playlist to anyone who wants to learn reactive programming. You explain in a way that is easy to grasp.
    BTW, did you cancel the next one?

  • @gautengrider
    @gautengrider 5 років тому +2

    Will you be doing a part 4 of this series?

  • @dprophecyguy
    @dprophecyguy 5 років тому +4

    Can we also have a mini-series on functional programming in JS without using any libraries? I loved the ramda one, but I think I should take a step back and first get comfortable with functional programming in JS.

    • @ChristopherOkhravi
      @ChristopherOkhravi  5 років тому +2

      Excellent idea! I could probably do that :) Meanwhile I could recommend my video on building Snake using FP JS. Thanks a lot for the suggestion and for watching :)

    • @ChristopherOkhravi
      @ChristopherOkhravi  5 років тому

      @@JohnSourvinos Hahahha

  • @francescodente2876
    @francescodente2876 5 років тому

    I think pipe could be implemented recursively like this:
    pipe (...os) {
    if (os.length == 0) {
    return this
    }
    this.subscribe(x => os[0].emit(x))
    return os[0].pipe(os.slice(1))
    }
    I made it on the fly so I'm not really sure if it is a working solution but I believe it's in the good direction.
    Btw brilliant series as always.

  • @MrRicharddaniel
    @MrRicharddaniel 5 років тому

    Awesome.. Keep up the good work sir :)

  • @ptu15
    @ptu15 Рік тому

    come back, we need you!

  • @stelioskiayias493
    @stelioskiayias493 5 років тому

    Thanks for the video -- what colour scheme are you using? 🤔

  • @danielvnzla6278
    @danielvnzla6278 3 роки тому +1

    you can use Object.is(-0, +0) // false

  • @neformen
    @neformen 5 років тому +1

    It's like a serial from TV, the most interesting will be in next episode 😂😂😂

    • @ChristopherOkhravi
      @ChristopherOkhravi  5 років тому

      Hehehe. Thanks for watching :)

    • @sanderlissenburg1608
      @sanderlissenburg1608 3 роки тому

      And just like your favorite tv show, it is canceled before the last episodes could be made.... :(.

  • @zeocamo
    @zeocamo 5 років тому

    you could make a tagLog function that you can use in the subscribe

  • @zeocamo
    @zeocamo 5 років тому

    the o.emit.bind(o) is the same thing as changing emit to a arrow function
    class Mapper {
    emit = (x) => {
    this.cbs.map(blah)
    }
    }

  • @haytam6472
    @haytam6472 5 років тому +1

    Can you do a source code walkthrough of a large open source project ? maybe live contributing also ? e.g. VS code

  • @dmytrolesyk4045
    @dmytrolesyk4045 5 років тому

    Cool video! Are you going to keep it up, though?

  • @oleksandr.pastukhov
    @oleksandr.pastukhov 5 років тому

    I’m assuming you’ve got some issues with switching to Linux since it’s a week since last video was published :)

    • @ChristopherOkhravi
      @ChristopherOkhravi  5 років тому

      Your assumption is entirely accurate! :)

    • @oleksandr.pastukhov
      @oleksandr.pastukhov 5 років тому

      Christopher Okhravi so wish you good luck with this and waiting for new videos!