Skip to content

fix: Transform Solid docs hook calls correctly#720

Open
GEREGUR wants to merge 1 commit intoTanStack:mainfrom
GEREGUR:solid_docs_fix
Open

fix: Transform Solid docs hook calls correctly#720
GEREGUR wants to merge 1 commit intoTanStack:mainfrom
GEREGUR:solid_docs_fix

Conversation

@GEREGUR
Copy link

@GEREGUR GEREGUR commented Feb 17, 2026

Summary

  • Adds solidTransform.ts with regex-based transformation to convert React-style useQuery({...}) to Solid-style useQuery(() => ({...}))
  • Integrates transformation in documents.server.ts before the broken string replacements
  • Skips the incorrect string replacement rules for Solid hooks since the transformation handles it properly

- Add solidTransform.ts module with regex-based transformation
- Transform useQuery({...}) to useQuery(() => ({...})) for Solid
- Skip broken string replacements in replaceContent
- Apply transformation before string replacements
@netlify
Copy link

netlify bot commented Feb 17, 2026

👷 Deploy request for tanstack pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 8c4d0c6

Copy link
Member

@SeanCassiere SeanCassiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is something, where the actual docs for the Project needs to be changed instead.

This change, in this PR, would be applied to all projects on all markdown files - making it impossible for a comparison style doc or to just circumvent this transform if needed.

We keep the our markdown parsing to the bare minimum and only add features which make it easier for the maintainers of the individual TanStack project write out their docs.


I'd suggest, opening a PR to Query or the docs of the project's you think needs correction. We also, have some special frontmatter we use for text-replacement allowing less duplicated content - see here.

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.

2 participants

Comments