Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 359 Bytes

state-management.md

File metadata and controls

26 lines (19 loc) · 359 Bytes

State Management

 var { reactive } = Dative;
 
 var SourceofTruth = reactive({
   name: "dative"
 })
 
 var vm = new Dative({
   el: "#app",
   data: SourceofTruth
 })
 vm.render()

 var app = new Dative({
   el: "#root",
   data: SourceofTruth
 })
 app.render()
 
 // it should update the two applications
 
 SourceofTruth.name = "Tobithedev";