Skip to content

Fast refresh not working with HOC (withForm) #1870

@bitabs

Description

@bitabs

Describe the bug

I noticed that no one has raised this before, but if you try to use withForm HOC form composition, you lose the fast-refresh:

Could not Fast Refresh ("SomeComponent" export is incompatible). Learn more at https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#consistent-components-exports

Your minimal, reproducible example

tanstack-form

Steps to reproduce

  1. Create a component that uses withForm
  2. Edit file
  3. Check the app

Expected behavior

As a developer, when I edit file with withForm HOC, the app should fast refresh.

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

  • OS: Mac
  • Browser: Chrome

TanStack Form adapter

react-form

TanStack Form version

v1.23.8

TypeScript version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions