Every time I see the phrase Functional Reactive Programming I realize that I don't understand what it is. I then go back to this question, think I understand what it is, and the cycle repeats later.
Example isn't another way to teach, it is the only way to teach -Albert Einstein
Is Angular an example/implementation of FRP? Why or why not?
An Angular application is a reactive system. The user clicks on a button, the application reacts to this event and updates the model. The model gets updated, the application propagates the changes through the component tree. Angular implements these two arrows very differently.
Alongside React and Vue, Angular is considered to be one of the top JS UI frameworks. However, it differentiates itself through a couple of factors. Unlike the other top 2, it's a full-blown framework, coming with everything you'd want a framework to have.
Functional programming paradigm is built upon the idea that everything is a pure function. Reactive programming paradigm is built upon the idea that everything is a stream observer and observable philosophy.
While RxJs is a functional programming library, it is also a reactive programming library. Reactive programming allows us to deal with the asynchronous nature of JavaScript in a seamless and very elegant manner.
I don't think it is. Angular is very much tied to states. In fact, if you watch a continuous function, you'll hit infinite recursion as the state is always dirty.
To make continuous functions work in the browser, the digest cycle needs to stop even when the state is dirty. Angular doesn't stop until the state is no longer dirty.
EDIT
Dart can be used for FRP though: http://victorsavkin.com/post/55007674849/functional-reactive-programming-in-dart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With