posit-dev / posit-dev/shinyreact

Hot reload: ship the dev ergonomics (follow-up to #132)

Open
#158 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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 shinyreact bundle. Fast Refresh works today only because the example bundles its own dev React — window.shinyreact.React is a production build (js/vite.config.ts pins NODE_ENV=production) and can't drive react-refresh. A shinyreact.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.config stub plugin + shiny-bridge indirection.

Follow-up to #132.

Filed from the retired docs/todos.md.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.