Skip to content

Commit

Permalink
Minor typo fixes (hadley#497)
Browse files Browse the repository at this point in the history
* Removed duplicated word

* Fix example URLs of shinyapps.io hosted app

* Fix variable name in paragraph to match code
  • Loading branch information
bholl authored Aug 18, 2021
1 parent 98f68e2 commit 2804403
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion action-bookmark.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ If you play around with the app and bookmark a few interesting states, you'll se

- `https://hadley.shinyapps.io/ms-bookmark-url/?_inputs_&damping=0.966&delta=1.25&length=100&omega=-0.54`

- `http://127.0.0.1:4087/?_inputs_&damping=0.997&delta=1.37&length=500&omega=-0.9`
- `https://hadley.shinyapps.io/ms-bookmark-url/?_inputs_&damping=0.997&delta=1.37&length=500&omega=-0.9`

To understand what's happening, let's take the first URL and tease it apart into pieces:

Expand Down
2 changes: 1 addition & 1 deletion reactivity-escaping.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ server <- function(input, output, session) {

Things get slightly more complicated in the next example, where we have an app with two buttons that let you increase and decrease values.
We use a `reactiveValues()` to store the current value, and then use `observeEvent()` to increment and decrement the value when the appropriate button is pushed.
The main additional complexity here is that the new value of `n()` depends on the previous value.
The main additional complexity here is that the new value of `r$n` depends on the previous value.

```{r}
ui <- fluidPage(
Expand Down
2 changes: 1 addition & 1 deletion reactivity-graph.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ The arrows coming out of a node are one-shot notifications that will fire the *n
Now that they've fired, they've fulfilled their purpose and we can erase them.

It's less obvious why we erase the arrows coming *in* to an invalidated node, even if the node they're coming from isn't invalidated.
While those arrows represent notifications that haven't fired, the invalidated node no longer cares about them: reactive consumers only care about notifications in order to invalidate themselves and that that has already happened.
While those arrows represent notifications that haven't fired, the invalidated node no longer cares about them: reactive consumers only care about notifications in order to invalidate themselves and that has already happened.

It may seem perverse that we put so much value on those relationships, and now we've thrown them away!
But this is a key part of Shiny's reactive programming model: though these particular arrows *were* important, they are now out of date.
Expand Down

0 comments on commit 2804403

Please sign in to comment.