I have a component:
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, I wish to target one of the thumnails and update it's style, I know what index the thumbnail has, how can I do this?
componentDidMount: function () {
this.flky = new Flickity('.carousel', flickityOptions)
this.flky.on('select', () => {
console.log('Flickity settled at ' + this.flky.selectedIndex)
})
}
You can do that using state variable for example