A Plotly widget rendered by the server (shinywidgets in Python,
plotly::renderPlotly in R) and mounted inside a React tree via ShinyOutput.
One www/ client, two servers.
Every leaf below is one checkable claim about this app. [py] / [r] / [js]
mark a claim that holds only in that language; (test) marks a claim pinned by
a unit test; (verify) marks a claim not yet checked against the code.
- output
greeting(reactive_output) →"Showing N random points"[r]returnsNULLwhileinput$num_pointsisNULL;req()is deliberately avoided so the silent error does not reach the client console[py]input.num_points()raises a silent exception before the first message
- output
scatter— a Plotly figure ofNstandard-normal(x, y)points, seeded 42, title"Random Scatter (N points)", margins l 40 / r 20 / t 40 / b 40[py]@render_plotlyfrom shinywidgets,px.scatterovernp.random.default_rng(42)[r]plotly::renderPlotlywithset.seed(42)andrnorm- the two servers draw different points — the RNG streams differ — so this is not a cross-language parity claim
[r]usesreq(input$num_points)here, unlikegreeting
- there is no
output_widget()/plotlyOutput()placeholder in either server - the render function's binding JS is discovered and delivered automatically
[py]set_react_page()inlines the dependency into<head>[r]page_react()cannot inline it (the UI is built beforeserver()runs), so the deps are pushed after the flush as ashinyreact-depscustom message and the bundle re-runsbindAll
- renders
nulluntiluseShinyInitialized()is true useShinyInput("num_points", 50)—<input type="range">,min10,max500,id="num-points", default 100 ms debounce(test)<ShinyOutput id="scatter" .../>inside a 400px-tall div(test)- default
tagName(div), so the element is<div id="scatter"> classNameis"shiny-ipywidget-output plotly html-widget html-widget-output shiny-report-size"— one element carrying both bindings' selectors(test)shiny-ipywidget-outputis what Python's shinywidgets binding matchesplotly html-widget html-widget-outputmirrors R'splotly::plotlyOutput()- only the running server's binding JS is loaded, so the other side's classes are inert
styleiswidth: 100%; height: 100%
- default
- the greeting paragraph renders the raw
greetingvalue - the slider's current value is echoed next to it as plain text
- no mount container in the page — the client appends its own
<div>to<body>