我尝试在我的 React Web 应用程序中使用 react dnd。我创建了一个 js 文件调用withDnDContext.js。当我编译它时,我收到一个错误'react-dnd' does not contain an export named 'DragDropContext'。我的 react-dnd 版本是最新的 9.3.2
这是我的 withDnDContext.js
import { DragDropContext } from 'react-dnd'
import HTML5Backend from 'react-dnd-html5-backend'
export default DragDropContext(HTML5Backend);
Run Code Online (Sandbox Code Playgroud)
有谁知道如何解决这个问题?
我试图在我的 React 网站中并排分配 div。但是,我收到了错误Uncaught Invariant Violation: Minified React error。
这是我在 React 网站上的工具栏
let EnhancedTableToolbar = props => {
const { numSelected, classes ,deletefunc} = props;
return (
<Toolbar
className={classNames(classes.root, {
[classes.highlight]: numSelected > 0,
})}
>
<div className={classes.title}>
{numSelected > 0 ? (
<Typography color="inherit" variant="subtitle1">
{numSelected} selected
</Typography>
) : (
<Typography variant="h6" id="tableTitle">
User List
</Typography>
)}
</div>
<div className={classes.spacer} />
<div className={classes.actions}>
{numSelected > 0 ? (
<div>
<div style="width: 100px; float:right;">
<Tooltip title="Delete">
<IconButton …Run Code Online (Sandbox Code Playgroud)