读取不明父母的孩子道具

时间:2019-09-13 11:28:41

标签: reactjs

我正在尝试访问道具的值,但是父道具是一个随机生成的数字。

如果这是一个简单的数组,它将类似于<div class="nowrap"> <a href="yerlioptik.com.tr"> <img src="image1"> </a> <a href="https://api.whatsapp.com/send?phone=05346317740″ target=" ”_blank&quot;"=""> <img src="image2"> </a> </div> ,但不幸的是,它看起来并不那么简单。如何获取url的值?

这是我的代码:

this.props.photos[0].url

我尝试过imagedetails={this.props.thought.photos} props.children.url等。

0 个答案:

没有答案