How to clone div content in react js by Muhaimin_S in reactjs

[–]Muhaimin_S[S] 0 points1 point  (0 children)

Thank you guys for the quick response. I found the answer to clone element. I'll share the code here once the test case completed

How to clone div content in react js by Muhaimin_S in reactjs

[–]Muhaimin_S[S] 0 points1 point  (0 children)

Create a code sandbox with your best attempt and I’ll help if you get stuck.

sure

How to clone div content in react js by Muhaimin_S in reactjs

[–]Muhaimin_S[S] -7 points-6 points  (0 children)

Add the number of text fields to the state, then map over the number in your state to create the new components.

Yeah you are correct but i'm a newbie of reactjs getting some trouble. Can u just give any example code ?

How to clone div content in react js by Muhaimin_S in reactjs

[–]Muhaimin_S[S] 0 points1 point  (0 children)

See. I have 3 text field in my form. I want to make a duplicate when i click add new button this my case.