Ich habe eine Komponente:Wie style Elemente von ComponentDidMount?
render: function() {
const item = this.props.item
return (
<div style={{marginTop: '20px', display: 'flex'}}>
{item.get('images').map((url, i) =>
<Thumbnail href='#' src={stripUrl(url)} onClick={() => this.flky.select(i)} />
´ )}
</div>
´ )
}
In componentDidMount möchte ich eine der thumnails Ziel und seinen Stil zu aktualisieren, ich weiß, was Index der Miniatur hat, wie kann ich das tun?
componentDidMount: function() {
this.flky = new Flickity('.carousel', flickityOptions)
this.flky.on('select',() => {
console.log('Flickity settled at ' + this.flky.selectedIndex)
})
}