Skip to content

Commit

Permalink
Update reactivity-motivation.Rmd with minor typo (#615)
Browse files Browse the repository at this point in the history
  • Loading branch information
shumza-nali authored Oct 16, 2024
1 parent 2fdd786 commit ef0d38d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion reactivity-motivation.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This is quite different from most R code, which typically deals with fairly stat

For Shiny apps to be maximally useful, we need reactive expressions and outputs to update if and only if their inputs change.
We want outputs to stay in sync with inputs, while ensuring that we never do more work than necessary.
To see why reactivity is so helpful here, we'll take a stab a solving a simple problem without reactivity.
To see why reactivity is so helpful here, we'll take a stab at solving a simple problem without reactivity.

### Why can't you use variables?

Expand Down
4 changes: 2 additions & 2 deletions scaling-functions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ This doesn't make testing or debugging any easier, but it does reduce duplicated
We could of course add `session` to the arguments of the function:

```{r}
switch_page <- function(i) {
updateTabsetPanel(input = "wizard", selected = paste0("page_", i))
switch_page <- function(i, session) {
updateTabsetPanel(session = session, input = "wizard", selected = paste0("page_", i))
}
server <- function(input, output, session) {
Expand Down
2 changes: 1 addition & 1 deletion scaling-modules.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ The difference is largely superficial for this simple app, but `moduleServer()`
Now that we have a complete app, let's circle back and talk about namespacing some more.
The key idea that makes modules work is that the name of each control (i.e. its `id`) is now determined by two pieces:

- The first piece comes from the module **user**, the developer who calls `histogramServer()`.
- The first piece comes from the module **user**, the developer who calls `histogramUI()`.
- The second piece comes from the module **author**, the developer who wrote `histogramServer()`.

This two-part specification means that you, the module author, don't need to worry about clashing with other UI components created by the user.
Expand Down

0 comments on commit ef0d38d

Please sign in to comment.