我有两个数组,一个包含 url,一个包含内容。它们看起来像这样:
const link = [ 'www.test0.com', 'www.test1.com', 'www.test2.com' ]
const content = [ 'this is test0 content', 'this is test1 content', 'this is test2 content' ]
如何同时映射两个数组并在我新创建的元素中使用它们的值?
我需要使用我的 reactplayer 的 url 值和内容的值作为播放器下方的文本。
所以它应该是这样的:
<Reactplayer url"link0" />
<ControlLabel>content0</ControlLabel>
这可能吗?什么是更好的设置方法?