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

React 18 support? #200

Open
1 of 3 tasks
Okrekso opened this issue May 17, 2022 · 1 comment
Open
1 of 3 tasks

React 18 support? #200

Okrekso opened this issue May 17, 2022 · 1 comment

Comments

@Okrekso
Copy link

Okrekso commented May 17, 2022

  • Bug
  • Feature Request
  • Question

Problem Report

I'm updating my project to React 18 because it's released now. My project using react-resizable and I'm getting such errors now when I'm trying to drag something.

Uncaught Error: <DraggableCore> not mounted on DragStart!

System Info

Node Version: 16.14.2
Browser: Chrome
OS: Windows

Reproduction

Use React 18 and add some draggable things

@vkmita
Copy link

vkmita commented May 18, 2022

Figured out my specific issue. I ran into this exception when I didn't pass a ref into my custom drag handle components.

<ResizableBox
  ...
  handle={(resizeHandle, ref) => <div ref={ref}>{resizeHandle}</div>}
>
  <div />
</ResizableBox>

This ref parameter is not part of the current ts types. I put up a PR to add them to @types/react-resizable here: DefinitelyTyped/DefinitelyTyped#60405

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

No branches or pull requests

2 participants