Simple Reactive
1 min
Many modern web front end frameworks implement some idea of “reactivity”. React, Angular, VueJS and probably others make use of this pattern to simplify updating a UI when the underlying state changes.
In my opinion its a elegant pattern for creating better web frontend’s. I thought it would be helpful to me to try and build a naive implementation from scratch using only javaScript and HTML. The implementation here is inspired by the VueJS framework. I am not claiming that this is how VueJS works internally. The code was inspired by the syntax and lifecycle of VueJS.
See the code here: https://github.com/jermeyz/simple_reactive
Play with the code here: https://playcode.io/2215603