Hey reactive JS folks! I'm working to bring Observables to the web platform by reviving a @thedomstandard proposal that got some attention a while ago. @BenLesh and I would love your feedback, so check out github.com/domfarolino/obser… if you want to do things like this soon:

Jul 28, 2023 · 1:38 PM UTC

36
115
781
518,525
Sort replies: Relevant Recent Liked
Nice, another 40 APIs added on top of existing 100 ways of doing same things. Glad we progress.
4
2
35
7,946
Thanks mate!
1
52
4,080
how does cleanup work? Also, this aligns very nicely with #EmberJS's choice of `on` to abstract add/remove Event Listener
1
4
1,395
"Cleanup" happens by unsubscribing from an Observable. You can do this implicitly with methods like `takeUntil()` that handle that internally, or you can do it explicitly with AbortController. See this example: github.com/domfarolino/obser…
9
1,010
Very interesting and beautiful API proposal. Would be awesome to create a library to test this and tweak it before making it official. I would use it, declarative programming rocks.
1
1
1,109
Thanks a lot! I owe much to the robust reactive/Observables community that folks like Ben have been building up for years. If all goes as planned, this would be usable in a Chromium Origin Trial by a number of sites on an opt-in basis: github.com/GoogleChrome/Orig….
3
969

ALT Self Isolation Only Day2 GIF

1
15
5,766
This is amazing!! Please make this happen
14
4,162
This is one of those things you look at and wonder why we have not had this a long time ago. It just makes sense 👍
12
3,044
> SolidJS: An identical interface to this proposal is exposed for users to use. That's very very misleading, just look at the screenshot below. Moreover, "observable" and "from" might be Solid's least used APIs, it'd be very surprised if even 0.1% of users use them.
5
624
Yessss! Amazing 🔥
1
2,583
As someone who works with three motion designers all named Gus, it's amusing that Chrome's DOM spec contributors are often named Dom.
1
7
3,273
I appreciate you really believe in them. I’m concerned about anti-patterns I’ve seen: - Merging two observables requires time assumption hacks - Cold vs hot observables are invisible until runtime - One observable subscriber writing to another subject creates stateful spaghetti
2
9
1,431
Please, no! To handle observables nicely, you need a lot of operators. All this world of specific semantics doesn't worth it. I wrote a lot of comparisons, and most of the code could be written imperatively and be pretty readable.
8
325
What not copying RxJS instead? M'y point is that, what makes the true strength of RxJs are the operators. With the RxJS approach (the pipe method), you can create your own operators and you're not limited to a static list of them. Also...
1
6
1,308
Please don't make subscription cause repeated side effects. The mess in rxjs where subscribing initiates the action and then having all the operators to stop that (like replay) is pretty horrible. Promises got this right.
6
1,079
Oh damn, yes. Having a more powerful alternatives to "faking it with promises" or "bringing in a library that builds them from scratch" for basic/common observable use cases would be amazing. Just having a lazy/cold construct available by default would make my day.
3
1,020
That’s incredible 👍
2
775
What's the story for adding custom operators without extending the prototype? We want to avoid a situation where libs cause conflicts and you're stuck with the built-in ops. That's the good thing about .pipe().
3
297
This is terrible. You may have 100 ways to do one job, but all of the ways are complicated, and sometimes even can’t find a perfect way to do.
1
306
please please dont bring observables anywhere
1
2
454
Are there any news on that one? Also reiterating my question — why not pipe? Initial implementation of RxJS had all those methods on Observable class, but they moved on to a more composable alternative with pipe + operators.
1
1
104
I feel like the journey from callback, to promise, to observable is pretty compelling - when I first started teaching student JS, I showed them the Observable proposal but had stopped as it was dead. Thanks for putting the effort in to bringing it back to life!
2
337
Having the exact functionality from RxJs would be killer! I have never seen a more useful library on frontend development.
1
54
Wow. This cud be a gamechanger
67
Much tighter than the pattern match proposal which is a dogs breakfast imo
242
If it was part of the platform and not js engine hence it could run multithread was fun. Otherwise it's just something that save some kb on the network quota
629
There’s a lot of things I love about this. Make the world more flapjax!!
1
1,840
Maybe don't? WASM exists for any performance concerns.
211

ALT Happened Before Will Happen Again GIF

715
We went this route in android with Rx 7-8 years ago and let me tell you if not used properly these chain of observable code becomes a spaghetti mess real fast. Heck we are trying to go back to imperative code albiet with reactive properties. github.com/cashapp/molecule
64
🤔dont u need to do JSON.parse before filter ?
32