Observer Pattern - Design Patterns in JavaScript

preview_player
Показать описание

The observer pattern makes use of observable objects to make your code reactive. An observable is an object (the subject) that maintains a list of dependents (observers) and notifies them when the state changes, usually by calling a broadcast method.

0:00 Introduction
1:37 Create observable with a class
3:46 Using the observable
5:05 Observable factory function
6:08 Practical example

🌎 Follow me here:
Рекомендации по теме
Комментарии
Автор

This is super useful for bootcamp student like me Clear explanation with good pace and pedestrian example

leoelicos
Автор

Thank you for sharing your knowledge and expertise.

KalibMartin-fm
Автор

Cool video! 👍 I find the class syntax so clean to work with. Could you elaborate a little bit why you prefer functions to classes?

luispato
Автор

It's pretty nice to implement this on a vanilla js project. But this is one of the reasons i hate working with Angular.

royz_
Автор

Pretty useful content thanks. If you don't mind how do get to understand this patterns so well and which book or materials did you use or currently using for study or research?

samchrist
Автор

I still dont get it so its just like useState?

kakun
Автор

Is there some practical situation that this could be a good tool to be used? Like in React, is this something that could help us with a problem?

joaopaulorodriguespereira
Автор

"you shouldnt use classes where u can use functions" instant like, functions gang

ts
Автор

what if subscribers are methods of objects of same class? You can't filter out them like this in unsubscribe method

mikhalpalych
Автор

Very useful 💥💥💥
Could you make one for the Buller patern

z-In-dex
Автор

your videos always useful, can you create video for upload nodejs app with (typescript, config, production env) in heroku.?

nikunjchaudhari