Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for React Native's SyntheticEvent type #3942

Open
JorensM opened this issue Jan 14, 2024 · 1 comment · May be fixed by #3972
Open

Support for React Native's SyntheticEvent type #3942

JorensM opened this issue Jan 14, 2024 · 1 comment · May be fixed by #3972

Comments

@JorensM
Copy link

JorensM commented Jan 14, 2024

Feature request

The Formik docs say that Formik is 100% compatible with React Native, but this is slightly untrue if you're using TypeScript. Formik's functions don't accept React Native's event type NativeSyntheticEvent, and the structure of the event is also slightly different and the value of the change is stored elsewhere, so I'm not even sure if Formik supports NativeSyntheticEvent. Because of this I have to convert my event to ChangeEvents before I can pass them to Formik's functions.

Current Behavior

NativeSyntheticEvent not supported.

Desired Behavior

NativeSyntheticEvent to be supported

Suggested Solution

Have all Formik functions that accept an event also be able to accept and handle NativeSyntheticEvent

Who does this impact? Who is this for?

This impacts developers who use Formik with Typescript+React Native

Describe alternatives you've considered

Current alternative is to convert the NativeSyntheticEvent to a ChangeEvent before passing it to the Formik function

@henderson2350
Copy link

Can we get this merged please?

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

Successfully merging a pull request may close this issue.

2 participants