mirror of
https://github.com/TanStack/router.git
synced 2026-11-16 19:38:07 +00:00
feat(router-utils, router-plugin): React default-import members and server-side builder chains are pure
React's default import is its CommonJS exports: `RecognizerTable.pureDefaultNamespaces` (the router planners' table lists 'react') makes `React.memo`/`forwardRef`/`lazy` of `import React from 'react'` pure calls, as for a namespace import. Vue and Solid have no default export. The planners' purity takes Start's builder chains in the server compile too (`ModuleAnalysisOptions.env` replaces `clientBuilders`), so both environments home a builder alike: an isomorphic fn only split code reads loads with the SSR chunk (no `eager-split:order` from the SSR build), and a server fn nested in a function may take a builder chain in its options in every environment. A builder is one instance per environment (call results are never copied; the provider copy is unchanged); a link on a `const` builder stays an effect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2966468587
commit
0709cc5608
12 changed files with 137 additions and 82 deletions
Loading…
Add table
Add a link
Reference in a new issue