posit-dev / posit-dev/shinyreact
Safeguard `reactive_output` against use outside the `ui.tsx` pattern
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 14
- Forks
- 3
- Avg merge
- 9h 12m
- Merged PRs (30d)
- 74
Description
shinyreact.reactive_output is designed to deliver values to useShinyOutputValue() hooks inside a ui.tsx app configured with set_react_page(). If used in a standard Shiny app (with ui.output_text() or other server-rendered UI elements), it silently sends a JSON payload that no client-side binding consumes. Add a runtime check (or a session-level marker set by set_react_page()) so reactive_output errors clearly when used outside the ui.tsx context.
Filed from the retired docs/todos.md.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace reactive_output, set_react_page(), and useShinyOutputValue() to understand how the ui.tsx context is marked and how standard Shiny outputs differ. Add a runtime error for reactive_output outside that context, then verify that ui.output_text() usage receives the clear error while configured ui.tsx usage still delivers values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100