Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update remaining references to param.reactive to param.rx #847

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions doc/user_guide/Reactive_Expressions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"This user guide is structured as two main sections:\n",
"\n",
"- [Reactive Functions](#Reactive-Functions): Using `param.bind` to declare functions that react when their inputs change.\n",
"- [Reactive Expressions](#Reactive-Expressions): Using `param.reactive` (or `.rx()` on Parameter objects) to wrap ordinary objects and/or parameters in a proxy that acts like the underlying object but reacts when an input changes."
"- [Reactive Expressions](#Reactive-Expressions): Using `param.rx` (or `.rx()` on Parameter objects) to wrap ordinary objects and/or parameters in a proxy that acts like the underlying object but reacts when an input changes."
]
},
{
Expand Down Expand Up @@ -419,7 +419,7 @@
"source": [
"## Reactive Expressions\n",
"\n",
"While reactive functions are very useful and allow writing arbitrarily complex logic, they still require writing a Python function definition, which can be verbose to write and difficult to read. With a `reactive` expression instead of an explicitly defined function, you can wrap any object or parameter value and apply operations on it, just as if you are working with the actual object, but now with reactive outputs. In other words, the reactive expression acts as a proxy for the underlying value, while supporting (almost) all operations that can be performed with the original object.\n",
"While reactive functions are very useful and allow writing arbitrarily complex logic, they still require writing a Python function definition, which can be verbose to write and difficult to read. With a reactive expression instead of an explicitly defined function, you can wrap any object or parameter value and apply operations on it, just as if you are working with the actual object, but now with reactive outputs. In other words, the reactive expression acts as a proxy for the underlying value, while supporting (almost) all operations that can be performed with the original object.\n",
"\n",
"### Using Parameters\n",
"\n",
Expand Down Expand Up @@ -505,7 +505,7 @@
"source": [
"### Using literal objects as inputs\n",
"\n",
"The convenient `param.reactive` function lets you make just about _anything_ reactive, without having to first define a new Parameterized object with explicit Parameters. E.g. we can create a `reactive` object from a static, literal value, such as a string:"
"The convenient `param.rx` function lets you make just about _anything_ reactive, without having to first define a new Parameterized object with explicit Parameters. E.g. we can create a reactive object from a static, literal value, such as a string:"
]
},
{
Expand All @@ -515,7 +515,7 @@
"metadata": {},
"outputs": [],
"source": [
"string_template = rx('Hello {name}!')\n",
"string_template = param.rx('Hello {name}!')\n",
"\n",
"string_template"
]
Expand All @@ -535,7 +535,7 @@
"metadata": {},
"outputs": [],
"source": [
"name = rx('world')\n",
"name = param.rx('world')\n",
"\n",
"str_expr = string_template.format(name=name)\n",
"\n",
Expand All @@ -549,7 +549,7 @@
"source": [
"### Setting the input value\n",
"\n",
"To update the input to a `reactive` object we can use the `.rx.set_input(new)` method:"
"To update the input to a `rx` object we can use the `.rx.set_input(new)` method:"
]
},
{
Expand Down