Skip to content

Commit 3aae9a3

Browse files
committed
Update custom ssr with inputs
1 parent 8b0aabc commit 3aae9a3

2 files changed

Lines changed: 9 additions & 13 deletions

File tree

129 KB
Loading

vignettes/tutorial/server-side-processing.rmd

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ Rendering a `reactable` with a lot of data can be inefficient. The initial loadi
1111

1212
A more efficient approach is to render only the data that is needed to be displayed.
1313

14-
`reactable_extras_ui()` and `reactalbe_extras_server()` is a wrapper for `reactable::reactableOutput()` and `reactable::renderReactable({reactable(...)})`.
15-
It renders only a subset of a large data in the server memory. This almost instantly renders the desired page and keeps the amount of memory used in the browser minimal.
14+
`reactable_extras_ui()` and `reactalbe_extras_server()` is a wrapper for `reactable::reactableOutput()` and `reactable::renderReactable({reactable(...)})`. It renders only a subset of a large data in the server memory. This almost instantly renders the desired page and keeps the amount of memory used in the browser minimal.
1615

1716
Consider this example data:
1817

19-
```r
18+
``` r
2019
library(shiny)
2120
library(reactable)
2221
library(reactable.extras)
@@ -39,7 +38,7 @@ mtcars_ultra <- purrr::map(
3938

4039
And compare the difference in initial load time and amount of memory used in the browser when loading all the data at once vs loading only the data needed for the page.
4140

42-
```r
41+
``` r
4342
# All of the data rendered all at once
4443
shinyApp(
4544
reactableOutput("test"),
@@ -74,19 +73,15 @@ shinyApp(
7473
)
7574
}
7675
)
77-
7876
```
7977

80-
Server-Side Processing | Rendering All Data At Once
81-
:--------------------------------------:|:-----------------------------------:
82-
![](images/server-side-processing.gif) | ![](images/full-data-rendered.gif)
83-
84-
85-
78+
| Server-Side Processing | Rendering All Data At Once |
79+
|:--------------------------------------:|:----------------------------------:|
80+
| ![](images/server-side-processing.gif) | ![](images/full-data-rendered.gif) |
8681

8782
You can Also use server side processing with custom inputs
8883

89-
```r
84+
``` r
9085
shinyApp(
9186
reactable_extras_ui("test"),
9287
function(input, output, server) {
@@ -109,4 +104,5 @@ shinyApp(
109104
}
110105
)
111106
```
112-
[](images/server-side-processing.gif)
107+
108+
![](images/ssr_custom_inputs.JPG)

0 commit comments

Comments
 (0)