Skip to content

useStore marked as deprecated without clear fix #2203

Closed
brandhaug/b2b-saas-starter
#12

Description

@Xhale1

Describe the bug

Seems around v1.33.0 of @tanstack/react-form, useStore was marked as deprecated with the following message

@deprecated — Use useSelector instead.

Tanstack form does not export useSelector unlike the previous useStore. Additionally, the documentation still uses useStore and I couldn't find any details in changelogs.

I'm guessing the upgrade path is to import useSelector directly from tanstack store? Perhaps that could be called out specifically somewhere (both in jsdoc and in the docs).

Your minimal, reproducible example

n/a

Steps to reproduce

n/a

Expected behavior

There's a clear migration path for deprecated funcitonality.

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

n/a

TanStack Form adapter

react-form

TanStack Form version

v1.33.0

TypeScript version

v6.0.3

Additional context

No response

Activity

  1. boldurean commented on Jun 4, 2026

    @boldurean

    Thanks for saving my time and logging this issue, I was confused as well after seeing this.

  2. Xhale1 commented on Jun 4, 2026

    @Xhale1
    Author

    For future readers: I ended up manually installing tanstack store and importing useSelector from there. Seems to be working as well as before!

  3. boldurean commented on Jun 8, 2026

    @boldurean

    For future readers: I ended up manually installing tanstack store and importing useSelector from there. Seems to be working as well as before!

    Why would they mark useStore as depricated and push us to install an alpha version of other library?

  4. nguyenleccss361 commented on Jun 8, 2026

    @nguyenleccss361

    so confuse, this make my agent just install tanstack react-store, I have to eslint-disable ts/no-deprecated. pls fix asap

  5. jadejr commented on Jun 8, 2026

    @jadejr

    Attempted fix here: #2206

  6. RodolfoSilva commented on Jun 18, 2026

    @RodolfoSilva

    It seems @tanstack/react-store is a peer dependency, so I think this is missing from the documentation, we need to import useSelector from there.

    -- import {useForm, useStore} from '@tanstack/react-form';
    ++ import {useForm} from '@tanstack/react-form';
    ++ import {useSelector} from '@tanstack/react-store';
  7. crutchcorn commented on Jul 9, 2026

    @crutchcorn
    Member

    Sorry all: To be clear useStore is deprecated in Store, but is not deprecated in usage alongside Form v1. You're welcome to update to useSelector (fully supported, useStore actually aliases to it), but rest assured that this is a TSDoc issue and you can continue to use useStore until Form v2 (which will be explicitly called out in our migration guide)

  8. added a commit that references this issue on Jul 9, 2026
    df52a12
  9. mwmcode commented on Jul 14, 2026

    @mwmcode

    I installed react-store alongside forms but now it's complaining that react-dom is a missing a peer dependency [of react-store] which is not needed in react-native codebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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