Reactjs 无法将材质ui withStyles()与dnd一起使用

Reactjs 无法将材质ui withStyles()与dnd一起使用,reactjs,material-ui,Reactjs,Material Ui,我能够以一种简单的方式再现错误。 以下是我看到的错误: 本地: Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail. Check the render method of `WithStyles(Card)`. in Card (created by WithStyles(Card)) in WithStyles(Card) (at

我能够以一种简单的方式再现错误。 以下是我看到的错误:

本地:

Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail.

Check the render method of `WithStyles(Card)`.
    in Card (created by WithStyles(Card))
    in WithStyles(Card) (at Todo.js:112)
本地和:

从我的谷歌搜索中,我似乎无法将
与样式一起使用,因为它是一个无状态的功能组件。如果是这样的话,还有什么选择?我想继续使用
with style
包装器(将mui主题和样式表注入组件)的优点


请注意,为了清晰起见,我简化了沙盒的代码(例如,我删除了redux)。

解决方案是将
组件包装在
div中。以下是解决方案,即将
组件包装在
div
中。以下是

在divs中包装材质UI组件的好方法在divs中包装材质UI组件的好方法
Invariant failed: Cannot get draggable ref from drag handle