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

Typescript React 18 type issue ParentSize #1824

Closed
peterwiebe opened this issue May 3, 2024 · 2 comments
Closed

Typescript React 18 type issue ParentSize #1824

peterwiebe opened this issue May 3, 2024 · 2 comments

Comments

@peterwiebe
Copy link
Contributor

Getting the following error after upgrading to React 18:

'ParentSize' cannot be used as a JSX component.
  Its type '({ className, children, debounceTime, ignoreDimensions, parentSizeStyles, enableDebounceLeadingCall, ...restProps }: ParentSizeProps & Omit<HTMLAttributes<HTMLDivElement>, keyof ParentSizeProps>) => Element' is not a valid JSX element type.ts(2786)

curious if anyone else has come across this issue and if they did, how did you solve it?

@hshoff
Copy link
Member

hshoff commented May 9, 2024

Hi @peterwiebe how are you importing ParentSize? It's the default export https://github.com/airbnb/visx/blob/master/packages/visx-responsive/src/components/ParentSize.tsx

@hshoff
Copy link
Member

hshoff commented May 27, 2024

Hi @peterwiebe, going to close this as we haven't heard back. Happy to reopen if needed.

@hshoff hshoff closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants