DEV Community

Discussion on: JavaScript vs JavaScript. Fight!

Collapse
 
artalar profile image
Artyom

I am researching reactivity in general and a few reactive patterns (frp, push \ pull, and so on) for a few years already and I want to insist on a "reactive" definition.

Reactive programming is a pattern of delegating the responsibility of initialization data processing to the data source, which doesn't know dependent units and can't interact with it outside one-way notification.
FRP, OORP, Flux, two-way binding, single-store, granular updates are just buzzwords on top of that, other high order patterns.
Rx, Solid, React, Even Emmiter is all about reactive programming.

The main reason for that is to move components coupling from code to runtime, that's all.

Collapse
 
bobdotjs profile image
Bob Bass

I never thought about this before I listened to Rich Harris and his talk about rethinking reactivity where he explained how React uses the virtual DOM, and Svelte essentially uses hierarchical chaining (I'm not sure if there's a proper name for it but that sounds about right).

The reason it was so interesting to me is because if I didn't know what the virtual DOM was and someone asked me how I thought Reactivity worked, my instinct would be to describe a chain of dependencies for each object.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

So basically having events for data changes?