Nestor
Nestor

Reputation: 13990

Why the name "Behavior" in BehaviorSubject in RX?

I'm curious, why do you think they used the name "Behavior" for the BehaviorSuject object in Ractive Extensions?

note: a behavior subject returns the last value (or the init vaue) as the first value to any subscriber.

Upvotes: 34

Views: 1939

Answers (1)

Bart De Smet
Bart De Smet

Reputation: 516

In the world of functional reactive programming, a behavior is a value that changes over time. This is exactly what a BehaviorSubject represents: when you subscribe you get the current value, and then you can continue to observe the changes. See http://en.wikipedia.org/wiki/Functional_reactive_programming.

Upvotes: 50

Related Questions