How does reactive programming work behind it?

Asked

Viewed 82 times

-1

I was reading about reactive programming and I got a question: how does reactive programming work underneath the scenes? What kind of logic is there behind checking any user changes and changing their real-time behavior? Is it some while infinite that keeps checking? (joke)

  • This question was answered here: https://answall.com/questions/55332/o-que%C3%A9-reactive-Programming-program%C3%A7%C3%A3o-reactive

  • You have an interesting answer here: https://answall.com/a/55380/5748

1 answer

-1

It can be said that reactive programming is an extended and more powerful version of the Observer standard. Given the premise of having observable objects as the program’s input port, one of the pillars of the reactive model is the idea that "data streams" (which we will now call streams) can be created from anything: discrete variables, data inputs, application properties, or as in the examples cited above, UI events or external application entries... The important thing to note here is that, regardless of how the stream input is built, the event handling code is the same. For example, your Twitter feed, or a Kafka topic reader, could be consumed in the same way as a button click. The stream becomes just the abstraction of an (potentially (and primarily!) asynchronous) data source, which emits values continuously, over which you can react accordingly.

  • So it’s really like there’s a while in the implementation that’s always checking to see if the origin of the data has changed??

Browser other questions tagged

You are not signed in. Login or sign up in order to post.