I often have the need to update a reactive expression. Over and over again I find that I lack a .set or .update method. I need that to be able to update via callbacks, .bind or in lambda expressions. Its friction I have to create a set or update function my self.
Please add a .set method.
expression.rx.set(value) # same effect as expression.rx.value=value
Could be used as
button.on_click(expression.rx.set)
Additional Context
This is also what React does. Provides a set_value function.
We originally had this but then removed it because .rx.value setting seemed enough but I'd agree. Having a way to update the value with an expression rather than a statement adds a lot of convenience.
I often have the need to update a reactive expression. Over and over again I find that I lack a .set or .update method. I need that to be able to update via callbacks,
.bind
or in lambda expressions. Its friction I have to create a set or update function my self.Please add a
.set
method.Could be used as
Additional Context
This is also what React does. Provides a
set_value
function.