Alternative Observer Syntax
In this lesson, we'll learn about an alternative syntax for defining observers that you'll come across often.
One more thing before we jump into more advanced topics about RxJS: there’s an alternative syntax you’ll often encounter often whenever creating an observer. In fact, you’ve already seen the syntax when we created the cocktail application.
Instead of passing in an object to the subscribe()
function, we can pass in functions. Here’s an example:
Get hands-on with 1400+ tech skills courses.