docs(react): add reference page for useTransform#2087
docs(react): add reference page for useTransform#2087mixelburg wants to merge 1 commit intoTanStack:mainfrom
Conversation
📝 WalkthroughWalkthroughAdded a new documentation page for the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/framework/react/reference/functions/useTransform.md`:
- Around line 21-25: The docs mention calling mergeForm(baseForm, serverState)
but don't state its import source; update the useTransform documentation to
explicitly note that mergeForm is exported from `@tanstack/form-core` (e.g.,
"import { mergeForm } from '@tanstack/form-core'") and clarify that it is not
provided by adapter packages, referencing the function name mergeForm and the
hook useTransform to help locate the text to change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1e9f2513-e51b-48ad-9d2f-e767cc757914
📒 Files selected for processing (1)
docs/framework/react/reference/functions/useTransform.md
| ### fn | ||
|
|
||
| `(formBase: AnyFormApi) => AnyFormApi` | ||
|
|
||
| A function that receives the base form API and returns a transformed form API. Typically calls `mergeForm(baseForm, serverState)` to layer server validation errors or default values on top of the client form. |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify that mergeForm is exported from adapter packages
# Search for mergeForm exports in adapter packages
echo "=== Searching for mergeForm in react-form-start ==="
fd -t f -e ts -e tsx . packages/react-form-start --exec rg -n "export.*mergeForm"
echo -e "\n=== Searching for mergeForm in react-form-nextjs ==="
fd -t f -e ts -e tsx . packages/react-form-nextjs --exec rg -n "export.*mergeForm"
echo -e "\n=== Searching for mergeForm in react-form-remix ==="
fd -t f -e ts -e tsx . packages/react-form-remix --exec rg -n "export.*mergeForm"
echo -e "\n=== Searching for mergeForm definition ==="
rg -n "function mergeForm|const mergeForm|export.*mergeForm" --type tsRepository: TanStack/form
Length of output: 387
Clarify the import source for mergeForm in the documentation.
The description references mergeForm(baseForm, serverState) but does not specify where to import it from. mergeForm is exported from @tanstack/form-core, not from the adapter packages. Update the documentation to clearly indicate the correct import source to prevent user confusion.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/framework/react/reference/functions/useTransform.md` around lines 21 -
25, The docs mention calling mergeForm(baseForm, serverState) but don't state
its import source; update the useTransform documentation to explicitly note that
mergeForm is exported from `@tanstack/form-core` (e.g., "import { mergeForm } from
'@tanstack/form-core'") and clarify that it is not provided by adapter packages,
referencing the function name mergeForm and the hook useTransform to help locate
the text to change.
Fixes #2075
The
useTransformhook is referenced indocs/config.jsonand linked from the SSR guide, but the filedocs/framework/react/reference/functions/useTransform.mdwas missing — causing the API reference link to redirect to the framework root page.This adds the missing reference page with:
Summary by CodeRabbit
useTransform()hook, including usage examples and SSR integration guidance.