Skip to content

feat: export the compat layer - #6

Merged
upupming merged 1 commit into
mainfrom
feat/react-compat-entry
Aug 25, 2026
Merged

upupming merged 1 commit into
mainfrom
feat/react-compat-entry

Conversation

@upupming

Copy link
Copy Markdown
Contributor

@react-navigation/core is written against React, so every app on Lynx has to alias react onto the compat layer this package ships — it fills in use, useInsertionEffect and startTransition. That makes it part of the public surface, but there was no entry point for it. This repository's own example reached it by path:

const reactCompat = resolve(
  dirname(require.resolve('@react-navigation/lynx/package.json')),
  'src/react-compat.ts',
);

Anyone outside had to do the same. Now:

const reactCompat = require.resolve('@react-navigation/lynx/react-compat');

Found while writing a consumer example for lynx-family/lynx-examples#417, which needed exactly this and had no supported way to get it.

The example here switched over, so the entry is exercised: pnpm build still produces a 298.8 kB bundle, pnpm typecheck and 21 tests pass.

Aliasing `react` onto it is not optional for any app using this package, so
reaching it through a path into `src/` was never going to hold.
@changeset-bot

changeset-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d382ca3

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

This PR includes changesets to release 1 package
Name Type
@react-navigation/lynx Minor

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

@pkg-pr-new

pkg-pr-new Bot commented Aug 25, 2026

Copy link
Copy Markdown
pnpm add https://pkg.pr.new/react-navigation/react-navigation-lynx/@react-navigation/lynx@d382ca3

commit: d382ca3

@upupming
upupming merged commit 3c83984 into main Aug 25, 2026
6 checks passed
upupming added a commit that referenced this pull request Aug 25, 2026
…ds (#8)

changesets/action runs `changeset version` in the working directory before it
pushes the release branch, so the publish step that follows it in the same job
sees a tree that is already bumped. 0.2.0 went out the moment #6 merged, while
its release PR was still open - and that PR's own run then had nothing left to
do. Gating on `has-changesets` puts the release back behind the merge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant