Skip to content

Commit 20781bd

Browse files
committed
Update examples to use lower case reactive.value
1 parent 7dd5587 commit 20781bd

File tree

16 files changed

+22
-21
lines changed

16 files changed

+22
-21
lines changed

examples/annotation-export/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040

4141
def server(input: Inputs, output: Outputs, session: Session):
42-
annotated_data = reactive.Value(weather_df)
42+
annotated_data = reactive.value(weather_df)
4343

4444
@reactive.calc
4545
def selected_data():

examples/brownian/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def reactive_smooth(n_samples, smoother, *, filter_none=True):
112112

113113
def wrapper(calc):
114114
buffer = [] # Ring buffer of capacity `n_samples`
115-
result = reactive.Value(None) # Holds the most recent smoothed result
115+
result = reactive.value(None) # Holds the most recent smoothed result
116116

117117
@reactive.effect
118118
def _():

examples/cpuinfo/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def cpu_current():
109109

110110

111111
def server(input: Inputs, output: Outputs, session: Session):
112-
cpu_history = reactive.Value(None)
112+
cpu_history = reactive.value(None)
113113

114114
@reactive.calc
115115
def cpu_history_with_hold():

examples/dataframe/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def light_dark_switcher(dark):
5555

5656

5757
def server(input: Inputs, output: Outputs, session: Session):
58-
df: reactive.Value[pd.DataFrame] = reactive.Value()
58+
df: reactive.value[pd.DataFrame] = reactive.value()
5959

6060
@reactive.effect
6161
def update_df():

examples/duckdb/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def load_csv(con, csv_name, table_name):
6767

6868

6969
def server(input, output, session):
70-
mod_counter = reactive.Value(0)
70+
mod_counter = reactive.value(0)
7171

7272
query_output_server("initial_query", con=con, remove_id="initial_query")
7373

examples/express/shared.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
# This reactive value can be used by multiple sessions; if it is invalidated (in
1717
# other words, if the value is changed), it will trigger invalidations in all of
1818
# those sessions.
19-
rv = reactive.Value(50)
19+
rv = reactive.value(50)

examples/model-score/plotly_streaming.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def update_plotly_data():
8383

8484
def deduplicate(func):
8585
with reactive.isolate():
86-
rv = reactive.Value(func())
86+
rv = reactive.value(func())
8787

8888
@reactive.effect
8989
def update():

examples/moduleapp/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def counter_ui(label: str = "Increment counter") -> ui.TagChild:
1818
def counter_server(
1919
input: Inputs, output: Outputs, session: Session, starting_value: int = 0
2020
):
21-
count: reactive.Value[int] = reactive.Value(starting_value)
21+
count: reactive.value[int] = reactive.value(starting_value)
2222

2323
@reactive.effect
2424
@reactive.event(input.button)

examples/typed_inputs/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
# But it is possible to specify the type of the input value, by creating a subclass of
2121
# Inputs. We'll do that for input.n2() and input.checkbox():
2222
class ShinyInputs(Inputs):
23-
n2: reactive.Value[int]
24-
check: reactive.Value[bool]
23+
n2: reactive.value[int]
24+
check: reactive.value[bool]
2525

2626

2727
def server(input: Inputs, output: Outputs, session: Session):

shiny/api-examples/Module/app-core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def counter_ui(label: str = "Increment counter") -> ui.TagChild:
1818
def counter_server(
1919
input: Inputs, output: Outputs, session: Session, starting_value: int = 0
2020
):
21-
count: reactive.Value[int] = reactive.Value(starting_value)
21+
count: reactive.value[int] = reactive.value(starting_value)
2222

2323
@reactive.effect
2424
@reactive.event(input.button)

0 commit comments

Comments
 (0)