Skip to content

fix: polyfill the builtins missing from Lynx's JS engine - #30

Merged
upupming merged 1 commit into
mainfrom
fix/lynx-builtin-polyfills
Sep 16, 2026
Merged

upupming merged 1 commit into
mainfrom
fix/lynx-builtin-polyfills

Conversation

@upupming

@upupming upupming commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@react-navigation/core, @react-navigation/routers and query-string call Array.prototype.findLast, findLastIndex and at, Object.hasOwn, String.prototype.replaceAll and queueMicrotask. Lynx's engine implements none of them, so navigating a stack crashed with TypeError: u.findLast is not a function in StackRouter.

Both entries import the polyfills, since ./stack doesn't go through the root entry. Every one is conditional, so they stop applying once the engine ships its own.

Verified on a Pixel 5 with the same polyfills loaded from the example entry: all six resolve on the main and background threads, and the Preload flow runs clean.

@changeset-bot

changeset-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 53b2272

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 Patch

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

@upupming upupming changed the title fix(example): polyfill the builtins missing from Lynx's JS engine fix: polyfill the builtins missing from Lynx's JS engine Sep 16, 2026
@upupming
upupming force-pushed the fix/lynx-builtin-polyfills branch from 6d050e0 to 53b2272 Compare September 16, 2026 04:00
@pkg-pr-new

pkg-pr-new Bot commented Sep 16, 2026

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

commit: 53b2272

@upupming
upupming merged commit 3b163b6 into main Sep 16, 2026
6 checks passed
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