Skip to content

ReactFormApi typing not exposed #824

Closed
@frankkluijtmans

Description

@frankkluijtmans

Describe the bug

In my React app I'm passing down instances of FormApi in a couple of places where I'll use some of the props that are added on top of it in ReactFormApi. I see that this ReactFormApi was added here 145e0a9#diff-71307ac787e0ed388c8e67d3821dce46c1753ef4cca87f9e2c4b225d3bd30681.

Since this type is not exposed I'm unable to properly type the FormApi instance I'm passing down in the props. Since there doesn't seem to be a replacement for it I get the feeling that exposing this type might've simply been overlooked 😅

Your minimal, reproducible example

CodeSandbox

Steps to reproduce

After upgrading from < 24.3 to 24.3 >

  1. Pass down FormApi instance in component props.
  2. Get TS error for form.Subscribe, form.Field etc.

Expected behavior

The ability to import ReactFormApi typings.

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

Any platform

TanStack Form adapter

None

TanStack Form version

v0.25.3

TypeScript version

5.5.2

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