Skip to content

Conversation

@meyer
Copy link
Contributor

@meyer meyer commented Feb 2, 2026

Changes

  • I added a new option to @astrojs/react, appEntrypoint. It looks a whole lot like the Vue integration’s appEntrypoint option and it functions nearly identically. Specify a path to a file that has a default-exported component and that component will be used to wrap every React island.
  • I added Astro.locals to the render context and am passing Astro.locals through to appEntrypoint’s component as a prop called locals. The prop is only set in a server environment; clientside it’s just undefined. Removed for now but you can see the change here (it’s pretty minimal)

Testing

New tests added that cover appEntrypoint in general as well as the locals prop.

Docs

PR with docs update is here: withastro/docs#13208

@changeset-bot
Copy link

changeset-bot bot commented Feb 2, 2026

🦋 Changeset detected

Latest commit: 7783a6c

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: react Related to React (scope) pkg: integration Related to any renderer integration (scope) pkg: astro Related to the core `astro` package (scope) docs pr labels Feb 2, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 2, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing meyer:meyer/react-wrapper-component (b344880) with main (955edb9)1

Summary

✅ 9 untouched benchmarks

Footnotes

  1. No successful run was found on main (a29e171) during the generation of this report, so 955edb9 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@meyer meyer force-pushed the meyer/react-wrapper-component branch from 216c185 to b344880 Compare February 2, 2026 02:27
@meyer meyer changed the title Add the Vue appEntrypoint feature to @astrojs/react as well Add appEntrypoint to @astrojs/react, pass locals to render context Feb 2, 2026
@meyer meyer changed the title Add appEntrypoint to @astrojs/react, pass locals to render context Add appEntrypoint to @astrojs/react, pass locals to renderer context Feb 2, 2026
@meyer meyer force-pushed the meyer/react-wrapper-component branch from b344880 to 7783a6c Compare February 2, 2026 08:40
@github-actions github-actions bot removed pkg: astro Related to the core `astro` package (scope) docs pr labels Feb 2, 2026
@matthewp
Copy link
Contributor

matthewp commented Feb 2, 2026

Thanks! We're going to discuss this internally and then will get back to you.

@meyer meyer changed the title Add appEntrypoint to @astrojs/react, pass locals to renderer context Add appEntrypoint to @astrojs/react, pass locals to render context Feb 2, 2026
@meyer meyer changed the title Add appEntrypoint to @astrojs/react, pass locals to render context Add appEntrypoint to @astrojs/react to enable users to wrap every React island with a custom component Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: integration Related to any renderer integration (scope) pkg: react Related to React (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants