D
D
darkDARK2020-05-25 20:24:24
React
darkDARK, 2020-05-25 20:24:24

How to modify the code?

https://codesandbox.io/s/admiring-mccarthy-zidjk?f...

I have boxes that appear when clicking on indexes 0 and 1 respectively. In them, I pass props and I want to ensure that after clicking on 0 , the block passes one value in props.name , and the other block has another value in the same prop.

I want a label with a name to appear when clicking on 0 , for example, name0 , and when clicking on 1 , name2 should appear .

I do not know how to explain it correctly, but I hope I conveyed the idea

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question