react-dnd doesn't work with Preact
See original GitHub issuereact-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.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:21 (9 by maintainers)
Top Results From Across the Web
Troubleshooting - React DnD - GitHub Pages
To fix this error, find the top-level component in your app. Usually, this is the root route handler. It doesn't have to be...
Read more >Uncaught Error: Cannot find module 'react/jsx-runtime'
So my setup actually was working. There was somehow a glitch in the symlink. I as able to resolve by running yarn unlink...
Read more >react-beautiful-dnd - npm
Beautiful and accessible drag and drop for lists with React. Latest version: 13.1.1, last published: 4 months ago.
Read more >Module not found: Can't resolve 'react/jsx-runtime' | bobbyhadz
Open your terminal in your project's root directory (where your package.json ... with NPM npm install react@latest react-dom@latest # 👇️ ONLY If you...
Read more >I was researching drag and drop in JS recently ... - Hacker News
I want the "preact" or "day.js" drag and drop library. ... One of the up and coming React DnD projects is https://github.com/clauderic/dnd-kit.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub 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.