DEV Community

loading...

Discussion on: React Drag N' Drop

Collapse
developman profile image
Dmitry Mineev

Hey, Metthew!
Thanks for this cool tutorial. I guess you missed something. return methods of Board.jsx and Card.jsx should include {props.children} inside of div tags:

return (
  <div
    id={props.id}
    className={props.className}
    onDrop={drop}
    onDragOver={dragOver}>
      {props.children}
  </div>
)
Enter fullscreen mode Exit fullscreen mode

Otherwise, the board will not display any card and cards will not display the names (Card one, Card two, Card three etc)

Collapse
matthewpalmer9 profile image
Matthew Palmer Author

Thanks, Dmitry! I included it in my Board.jsx, but I forgot to showcase that in Card.jsx. I'll update the tutorial with that information. Great catch, my friend! I appreciate your careful eye!