Reactjs DnD:不变量失败:已提供。未为innerRef提供HTMLElement
我是按照教程,但我意外地得到了这个错误,有人看到发生了什么 以下是全部错误: react\u devtools\u backend.js:2557 react Beauty dnd:出现安装问题 遭遇。>不变量失败:已提供。未提供innerRef 提供了一个HTMLElement。您可以找到有关使用innerRef的指南 回调函数 地址: 可删除代码:Reactjs DnD:不变量失败:已提供。未为innerRef提供HTMLElement,reactjs,react-component,react-dnd,react-beautiful-dnd,Reactjs,React Component,React Dnd,React Beautiful Dnd,我是按照教程,但我意外地得到了这个错误,有人看到发生了什么 以下是全部错误: react\u devtools\u backend.js:2557 react Beauty dnd:出现安装问题 遭遇。>不变量失败:已提供。未提供innerRef 提供了一个HTMLElement。您可以找到有关使用innerRef的指南 回调函数 地址: 可删除代码: render() { const { column, clients } = this.props; retur
render() {
const { column, clients } = this.props;
return (
<Container>
<Title>{column.name}</Title>
<Droppable droppableId={column.id}>
{(provided) => (
<TaskList
innerRef={provided.innerRef}
{...provided.droppableProps}
>
{clients.map((client, idx) => (
<Task
key={client.id}
client={client}
index={idx}
/>
))}
{provided.placeholder}
</TaskList>
)}
</Droppable>
</Container>
);
}
render() {
const { client, index } = this.props;
return (
<Draggable draggableId={client.id} index={index}>
{(provided) => (
<Container
innerRef={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
>
{client.name}
</Container>
)}
</Draggable>
);
}
render(){
const{column,clients}=this.props;
返回(
{column.name}
{(已提供)=>(
{clients.map((client,idx)=>(
))}
{提供的.占位符}
)}
);
}
可拖动代码:
render() {
const { column, clients } = this.props;
return (
<Container>
<Title>{column.name}</Title>
<Droppable droppableId={column.id}>
{(provided) => (
<TaskList
innerRef={provided.innerRef}
{...provided.droppableProps}
>
{clients.map((client, idx) => (
<Task
key={client.id}
client={client}
index={idx}
/>
))}
{provided.placeholder}
</TaskList>
)}
</Droppable>
</Container>
);
}
render() {
const { client, index } = this.props;
return (
<Draggable draggableId={client.id} index={index}>
{(provided) => (
<Container
innerRef={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
>
{client.name}
</Container>
)}
</Draggable>
);
}
render(){
const{client,index}=this.props;
返回(
{(已提供)=>(
{client.name}
)}
);
}
谢谢你