|
|
|
|
|
by qwertyuiop924
3600 days ago
|
|
Are you talking about Computed Values? Because Data Binding has nothing to do with that. Not really. In any case, Computed values make 2 way binding more expensive, because you have to run a depgraph on all the vars that are part of the binding network, every time an event fires. This is O(n). This is only one reason why Computed Values, as implemented in JS, are a Bad Idea. If you have to update a var on event fire, okay, but leaving the things everywhere is slow and ungainly. If you instead change the var to a function call, you can optimize far better, because you only have to update when the value is read. In conclusion, if you want to polymorphism between functions and variables, treat everything as a function, not as a variable. At least, I think that's a response to your question. Your English is pretty broken, so it's hard to tell. Sorry. |
|