(React JS and JavaScript)How do i make a component child of parent using drag and drop

I have a component_1 component_2 and component_3.

I should be able to make a component as a child by either drag and drop on another component (parent). In another words i want to create a link between them as parent and child. How can i do it. What are different ways ?

Here is gif how can i achieve the same functionality using ReactJS and JavaScript.
Component_1 is parent of component_2 and component_3


Please reply with detail and resources if possible.
Thanks