Skip to content

Conversation

@erashu212
Copy link

Closes #3942

@changeset-bot
Copy link

changeset-bot bot commented May 14, 2024

⚠️ No Changeset found

Latest commit: ac2a034

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented May 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
formik-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2024 0:04am

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@@ -1,4 +1,5 @@
import * as React from 'react';
import { NativeSyntheticEvent } from 'react-native';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { NativeSyntheticEvent } from 'react-native';
import type { NativeSyntheticEvent } from 'react-native';

import isPlainObject from 'lodash/isPlainObject';
import cloneDeep from 'lodash/cloneDeep';
import * as React from 'react';
import { NativeSyntheticEvent } from 'react-native'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { NativeSyntheticEvent } from 'react-native'
import type { NativeSyntheticEvent } from 'react-native'

@quantizor
Copy link
Collaborator

quantizor commented Aug 29, 2024

Let's actually just inline the type instead of requiring the user to install react-native if they're not using it, etc:

export interface NativeSyntheticEvent<T>
  extends React.BaseSyntheticEvent<
    T,
    React.ElementRef<React.ComponentType<any>>,
    React.ElementRef<React.ComponentType<any>>
  > {}

And please add a changeset :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for React Native's SyntheticEvent type

2 participants