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 reactivity-motivation.Rmd with minor typo #615

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
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