module_init_data | R Documentation |
This module manages the data
argument for srv_teal
. The teal
framework uses teal.data::teal_data()
,
which can be provided in various ways:
Directly as a teal.data::teal_data()
object. This will automatically convert it into a reactive
teal_data
.
As a reactive
object that returns a teal.data::teal_data()
object.
ui_init_data(id)
srv_init_data(id, data)
id |
( |
data |
( |
teal_data
:The data in the application can be reactively updated, prompting srv_teal()
to rebuild the
content accordingly. There are two methods for creating interactive teal_data
:
Using a reactive
object provided from outside the teal
application. In this scenario,
reactivity is controlled by an external module, and srv_teal
responds to changes.
Using teal_data_module()
, which is embedded within the teal
application, allowing data to
be resubmitted by the user as needed.
Since the server of teal_data_module()
must return a reactive
teal_data
object, both
methods (1 and 2) produce the same reactive behavior within a teal
application. The distinction
lies in data control: the first method involves external control, while the second method
involves control from a custom module within the app.
For more details, see module_teal_data
.
A reactive
object that returns:
Output of the data
. If data
fails then returned error is handled (after tryCatch()
) so that
rest of the application can respond to this respectively.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.