form icon indicating copy to clipboard operation
form copied to clipboard

Latest react-native 0.79.2 & Expo version errors makes tanstack form unusable

Open fendyk opened this issue 7 months ago • 1 comments

Describe the bug

When doing something simple as using the form.Field, I receive the following error:

right operand of 'instanceof' is not an object

Code (check repo for more info):

const form = useForm({
  defaultValues: {
    firstName: "John",
    lastName: "Doe",
  },
  onSubmit: async ({ value }) => {
    // Do something with form data
    console.log(value);
  },
});

<form.Field
    name={"firstName"}
    children={(field) => (
        <View>
          <Text className={"bg-red-500 text-2xl"}>{field.state.value}</Text>
        </View>
    )}
/>

Your minimal, reproducible example

https://github.com/fendyk/RN-Expo-Tanstack-Form-Example.git

Steps to reproduce

Clone the following repo: https://github.com/fendyk/RN-Expo-Tanstack-Form-Example.git

install deps, and then run bun run android

Expected behavior

It should work as intended

How often does this bug happen?

Every time

Screenshots or Videos

Image Image

Platform

Android & iOS (React native)

TanStack Form adapter

None

TanStack Form version

1.11.3 or greater

TypeScript version

5.8.3 or greater

Additional context

No response

fendyk avatar May 29 '25 11:05 fendyk

I believe it is related to this issue:

https://github.com/TanStack/form/issues/1501#issuecomment-2919178134

jrhager84 avatar May 29 '25 19:05 jrhager84

Almost certainly a dupe of #1501

crutchcorn avatar Jun 19 '25 14:06 crutchcorn