Type error in `useStore` when upgrading from 1.28.0 to 1.28.4
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 893
- Forks
- 114
- Avg merge
- 8d 14h
- Merged PRs (30d)
- 3
Description
Describe the bug
We have a fair few places in our codebase where we have previously done
const formState = useStore(form.store);
which has worked fine until I just tried to upgrade to 1.28.4, where it now fails with
src/App.tsx:13:21 - error TS2554: Expected 2-3 arguments, but got 1.
13 const formState = useStore(form.store)
And yes, I know this is not how you're supposed to write it, but that's how it was written by the guy who wrote it.
Your minimal, reproducible example
https://github.com/sondr3/tanstack-react-form-types
Steps to reproduce
pnpm build- Observe type error
Expected behavior
No breaking changes in patch releases.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
N/A
TanStack Form adapter
react-form
TanStack Form version
1.28.4
TypeScript version
5.9.3
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked minimal reproduction and run pnpm build, focusing on the useStore call in src/App.tsx. Compare the relevant useStore types between versions 1.28.0 and 1.28.4; done means the reproduction builds without the TS2554 error while preserving the reported one-argument usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100