problem description
how do I add moving content to the target box when using React dnd to implement drag and drop?
related codes
Container.js
<Source name={item.name} key={item.id} id={item.id} index={index} icon={item.icon} />
Source.js
return (
connectDragSource(
<div className="app-source" style={style}>
{name}
<i className={"iconfont " + icon}></i>
</div>
)
Target.js
return connectDropTarget(
// style={style}
<div className="app-target">
{isActive ?
"Hummmm, source!" :
"Drag here to order!"
}
</div>
)
figure
later
I have read the React dnd document for two days, but I still don"t know how to add mobile content to the target box. Who knows, thank you ~