param.reactive.reactive_ops.value#
- property reactive_ops.value#
Get or set the current state of the reactive expression.
When getting the value it evaluates the reactive expression, resolving all operations and dependencies to return the current value. The value reflects the latest state of the expression after applying all transformations or updates.
- Returns:
The current value of the reactive expression, resolved based on the operations and dependencies in its pipeline.
- Return type:
any
Examples
Access the value of a basic reactive expression:
>>> import param >>> rx_value = param.rx(10) >>> rx_value.rx.value 10
Update the reactive expression and retrieve the updated value:
>>> rx_value.rx.value = 20 >>> rx_value.rx.value 20
Evaluate a reactive pipeline:
>>> rx_pipeline = rx_value.rx.pipe(lambda x: x * 2) >>> rx_pipeline.rx.value 40