Skip to content

Type error in useStore when upgrading from 1.28.0 to 1.28.4 #2074

@sondr3

Description

@sondr3

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

  1. pnpm build
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions