preact: react-dnd doesn't work with Preact

react-dnd doesn’t seem to work with Preact.

I’ve narrowed down the problem to that where React gives connectDragSource(...) a DOM node, Preact gives it a component instead. When the HTML5-Backend of react-dnd then tries to add attributes to the DOM nodes it fails because the component doesn’t have a setAttribute method.

I’m not quite sure what’s causing this, but i’m guessing it’s some API difference. Most things seem to work but when it comes to adding then exceptions are thrown.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 21 (9 by maintainers)

Most upvoted comments

@developit This looks promising. I haven’t tested it though, but i will try to do it this week and get back to you!

Yup! Refs were a sore spot for sure, this is likely the last of the issues with them.