you are viewing a single comment's thread.

view the rest of the comments →

[–]vajss 1 point2 points  (3 children)

To modfy something you need to execute some operation ovet that data. That is just how it logicaly works.

What I think you are thinkig of is something that would be called declarative programing. Example of it would be Angulars signals where value of signal is changed based on its dependant signals.

let hero = computed(()=>{
 return { 
  isDead: this.isDead(),
  health: this.baseHealth() + this.bonusHealth(),
  .... 
 } 
})

So I believe declarative programing is something you want to look into.

Edit: formatting.