【发布时间】:2021-06-30 13:43:57
【问题描述】:
我使用一个组件作为子组件如下,在父组件即ShowBodyQuestionsForArchive组件中,我使用子组件如下:{children}
在 ShowBodyQuestionsForArchive 组件(父)中我有另一个组件如下:
我想改变ShowComparetiveItemsForArchive组件(子)中ShowImage组件的数据,显示为{children}
【问题讨论】:
-
试着把它作为道具给孩子。 stackoverflow.com/questions/32370994/…
标签: javascript reactjs nested components pass-data