I was following the tutorial but I unexpectedly got this error, does anyone see what is going on?
Here is the full error:
react_devtools_backend.js:2557 react-beautiful-dnd: A setup problem was encountered. > Invariant failed: provided.innerRef has not been provided with a HTMLElement. You can find a guide on using the innerRef callback functions at:https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/using-inner-ref.md
Droppable Code:
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>
);
}
Draggable Code:
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>
);
}
Thank you!!!