App UI reactivity - single table row #2779
-
Hi, can you please help me understand the reactivity model of UI components. My goal is to update a single table row after a successful database update. I've tried I know there is a Thanks as always for your help. Geoff |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The Reactivity model that we use is based on the concepts of Reactive Programming. https://en.wikipedia.org/wiki/Reactive_programming UI reactivity is based on dataflows and it's often not possible to mutate values directly except for mutable components by nature such as inputs. We do have one mutable data source which is state. So you can either re-read completely your table after update OR make your table use as datasource state.foo and mutate state.foo directly with any transformer/frontend scripts. You will need a script to also hydrate initially state.foo The reason for avoiding mutability is that it's an anti-pattern for highly reactive, large scale apps. Let say you mutate your table and then one of the input of the runnable your table is based change and trigger a refresh of it, now your mutation is gone. |
Beta Was this translation helpful? Give feedback.
The Reactivity model that we use is based on the concepts of Reactive Programming. https://en.wikipedia.org/wiki/Reactive_programming
UI reactivity is based on dataflows and it's often not possible to mutate values directly except for mutable components by nature such as inputs. We do have one mutable data source which is state. So you can either re-read completely your table after update OR make your table use as datasource state.foo and mutate state.foo directly with any transformer/frontend scripts. You will need a script to also hydrate initially state.foo
The reason for avoiding mutability is that it's an anti-pattern for highly reactive, large scale apps. Let say you mutate your tab…