I'm trying to make a Trello clone using React react-dnd. Just by entering the code below I get the error
const [{ isDragging }, dragRef] = useDrag({
item: { type: "CARD" },
collect: (monitor) => ({
isDragging: monitor.isDragging(),
}),
});
I get the following error
spec.type must be defined
invariant
C:/Users/lucca/Documents/GitHub/2B-task/src/index.ts:28
25 | );
26 | } else {
27 | let argIndex = 0;
> 28 | error = new Error(
| ^ 29 | format.replace(/%s/g, function() {
30 | return args[argIndex++];
31 | })