Skip to main content

shinyreact Python Reference

Pages

Bootstrap a React client from the app file.

set_react_page Set the page for this Express app to a React app (the ui.tsx pattern).
page_react Create a React page from conventional assets — no HTML file required.
page_react_html Serve a React index.html document (the ui.tsx pattern, Core API).
ReactApp :class:shiny.App for the ui.tsx pattern — the UI is discovered.
page_bare Create a bare HTML page with only Shiny dependencies.
page_react_dep Build an HTMLDependency for a React app’s JS and CSS entry points.

Outputs

Publish JSON to useShinyOutputValue() hooks.

reactive_output Publish a reactive JSON value to the client (the ui.tsx pattern).

Messaging

Push messages to useShinyMessageHandler() hooks.

send_message Send a custom message from server to client React components.

Testing

Record the wire payloads a Playwright test observes. For testing a server with no browser, see shiny.testserver.test_server().

playwright.WireTap Passive tap on the Shiny websocket, with retrying expectations.