posit-dev / posit-dev/shinyreact
Hot reload: ship the dev ergonomics (follow-up to #132)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 14
- Forks
- 3
- Avg merge
- 9h 12m
- Merged PRs (30d)
- 74
Description
examples/ui-tsx/09-hmr/ proves React Fast Refresh for the ui.tsx pattern with no backend change (a Vite dev server alongside Shiny; the dev stub swaps www/app.js). Two follow-ups remain:
- Dev
shinyreactbundle. Fast Refresh works today only because the example bundles its own dev React —window.shinyreact.Reactis a production build (js/vite.config.tspinsNODE_ENV=production) and can't drivereact-refresh. Ashinyreact.dev.js(React dev + refresh) would let the page share one dev React, but loading it needs a backend dev switch (the bundle is injected by the page dependency). - A shipped dev helper / CLI so authors don't hand-copy the
vite.configstub plugin +shiny-bridgeindirection.
Follow-up to #132.
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
Start with examples/ui-tsx/09-hmr/, js/vite.config.ts, and the page dependency that injects the bundle. Run the HMR example to understand the current dev React and shiny-bridge flow. Done means the remaining dev bundle/backend switch and a shipped helper or CLI are defined and usable without hand-copying the Vite stub.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript, vite
- Domain
- frontend, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100