Reactive Programming from Scratch (JavaScript) - Ep1

preview_player
Показать описание
Let's build a reactive JavaScript library, inspired by RxJS, from scratch.

⭐️ Support the channel on Patreon:

► Playlist:
Рекомендации по теме
Комментарии
Автор

Quality editing, good descriptions -- although a bit broad -- was able to follow along perfectly as a julia, assembly, c, c++ programmer. Wanted to make a little reactive library to hook into Julia, maybe even further, via JSExpressions. The use of map() was weird, but I mostly wanted to see how you craft this sort of paradigm in JavaScript. Being a functional programming proponent, this is much like using parametric polymorphism for indexes of the type mutation. Thanks yo!

emmaccode
Автор

Sidenote: in your example, you used map inside of the emit method in order to perform a simple iteration of the elements in the array. IMO thats a wrong use of the map function, as map primary use case is to apply a transformation fn to every element in the array and collect the results into a new one. So you are generating some overhead.

TL;DR; map != foreach/for

Jtoled
Автор

Damn you nailed the idea of doing this series. Thank you very much

dancelmarkyosef
Автор

Dude...
You are just crazy !!

Super awesome stuff !! Amazing energy.

I am amazed to find your channel.

Please keep up the great work !!

namangarg
Автор

Great Video. I just love the way you describe things in Computer Science.

sampaiomarcelo
Автор

For your example of tap, you don't need to use curly braces with the return keyword, you can use parenthesis and a comma to do the same thing.
const tap = f => x => (f(x), x)

ghostinplainsight
Автор

Awesome! Looking forward to this series.

JubairAhmadSiam
Автор

This is my favorite approach to new libraries, I saw a similar one for react hooks, in the end state management ends up looking like a oop thing.
Why did you use a class and not a closure?
I love your channel. It would be super cool if you would also talk about architecture for data oriented architecture, or ecs architecture, or functional programming architecture.
You could also "rebuild" other libraries.

hugodelnegro
Автор

Valuable content as usual! Thanks a lot Christopher.

blokche_dev
Автор

Dude, I love your vids! Right to the point! Thanks

aris
Автор

Your observable is subject actually. Subject can emit values to multiple observables by a next method.

o.voytyn
Автор

thank you very much from egypt
i am a beginner and i have a suggestion
first is the reactive functional programming is a paradigm?
i think that this will be great if we discuss in this tutorial more than one paradigm
i mean that if we can say if we do this thing by reactive so we will do it that way and if we do the same thing by another paradigm we will do it that way. and this paradigm is better that that paradigm because 1... 2... 3...
it's just a suggestion
and again thank you very much

displayblock
Автор

always top notch material, good stuff

rsdntevl
Автор

this is excellent, thanks for making this!!

caliwolf
Автор

Hi, I am not able to understand function chaining in a pipe can you suggest some reading.Thanks

gauravjoshi
Автор

How can I get to that level of vim fluency I only know :wq and jhkl

Luxcium
Автор

I guess your variadic pipe function is slightly wrong.

In the original version it was const pipe = f => g => g(f(x)) which has a nice property that it can be partially applied.

For example:
const doubleFirst = pipe(double)
doubleFirst(console.log)(1) // => logs 2 to console

So it still needs a second function before the number argument.

But in the variadic form pipe(double) is just double. I cannot write doubleFirst(console.log)(1), I lost the pipeing.

attilatoth
Автор

map is not a forEach, and you should copy the x for each of the cbs because if any of the cbs is changing the x then it will be changed for the rest of the cbs

zeocamo
Автор

ReactiveX So fuckin awesome :D Thanks Chris!

rafaelcisnerosgomez
Автор

Does anyone know of a "thrush" equivalent in lodash or lodash/fp?

guillaumeturgeon