feat: add NativeScript support for React Router and Start#7874
feat: add NativeScript support for React Router and Start#7874tannerlinsley wants to merge 8 commits into
Conversation
|
Important Review skippedToo many files! This PR contains 167 files, which is 17 over the limit of 150. To get a review, narrow the scope: Upgrade to Pro+ to raise the limit. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (78)
📒 Files selected for processing (167)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit 6392560
☁️ Nx Cloud last updated this comment at |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
🚀 Changeset Version Preview11 package(s) bumped directly, 14 bumped as dependents. 🟥 Major bumps
🟨 Minor bumps
🟩 Patch bumps
|
3312098 to
41975f8
Compare
Bundle Size Benchmarks
The following scenarios have bundle-size changes compared with the baseline:
Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better. |
4e0ff8e to
ca4eb49
Compare
Merging this PR will improve performance by 44.66%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Memory | mem server peak-large-page (react) |
2,184.3 KB | 960.9 KB | ×2.3 |
| ⚡ | Memory | mem server error-paths not-found (solid) |
763 KB | 423.7 KB | +80.08% |
| ⚡ | Memory | mem server peak-large-page (solid) |
1,386.8 KB | 786.3 KB | +76.37% |
| ⚡ | Memory | mem server serialization-payload (react) |
5.2 MB | 3.2 MB | +62.99% |
| ⚡ | Memory | mem server error-paths not-found (react) |
266.6 KB | 251.9 KB | +5.87% |
| ⚡ | Memory | mem server request-churn (react) |
503.7 KB | 488.1 KB | +3.18% |
| ⚡ | Simulation | client-async-pipeline navigation loop (vue) |
46 ms | 44.6 ms | +3.12% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing taren/react-nativescript-router-alpha (6392560) with main (07ce903)
There was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud has identified a possible root cause for your failed CI:
We classified this failure as an environment state issue rather than a code change. The error occurs in a compiled dist artifact (e2e/e2e-utils/dist/esm/e2eSetupTeardown.js) that the PR does not touch, and the export in question is correctly present on disk today — indicating the test ran against a stale build during CI. Re-running the pipeline should resolve this without any code changes.
No code changes were suggested for this issue.
Trigger a rerun:
🎓 Learn more about Self-Healing CI on nx.dev
Summary
Adds an official React NativeScript target for TanStack Router and TanStack Start.
@tanstack/react-router/native, based on the API direction from feat: add experimental React Native router adapter #7622.@tanstack/react-nativescript-router, rendering through NativeScriptFrame,Page, andActionBarprimitives rather than a WebView.tsr native initto scaffold a native target into an existing React Router or Start app.Architecture
The shared stack contract is exposed from
@tanstack/router-core/native-navigationand is host-independent. It stays out of standard web navigation hot paths and bundles. React Router exposes a native-only retained-state facade that a React Native adapter can also build on without adding work to normal React rendering or hooks. NativeScript-specific page retention, native history synchronization, gestures, action bars, and renderer integration remain in the new adapter package.The Start native plugin compiles a standalone client bundle and rewrites server functions to an explicit deployed HTTP(S) endpoint. Route definitions, generated types, loaders, params, search validation, redirects, blockers, and server functions can be shared. DOM views and CSS remain host-specific and use
-native.tsxsibling modules.Validation
Run against current
main:@tanstack/react-nativescript-router: 55 unit tests, strict types, ESLint, ESM/CJS build, publint, and attwNativeScript release dependencies
Native runs pass with the upstream fixes below applied. Publishing the adapter should wait for NativeScript releases containing them so consumers do not need patches:
Initial scope
@nativescript-community/react19, and Vite 7.3--no-hmr