I am trying to show a series of pictures but the following code does not replace {i}
with the actual number. It renders:
<div>
<img src='/img/picture{i}.jpg' />
<img src='/img/picture{i}.jpg' />
</div>
This is the code.
class Pictures extends Component {
render () {
return (
<div>
{Array.from({length: 2}, (_, i) => (
<img src='/img/picture{i}.jpg' />
))}
</div>
)
}
}