so what i try to achieve here is very similar to what is done here Transition flex-grow of items in a flexbox
But what i wonder how this could be done with React say i h
You can set active index on click:
// State this.state = { activeIndex: null }; // event onElementClicked(e) { this.setState({ activeIndex: e.target.index }) } // class to use className={this.index === this.state.activeIndex ? 'big-size' : ''}