import React, { Component } from 'react'; export default class PairComponent extends Component{ constructor(props) { super(props); this.state = {pairName: this.props.pair, index: this.props.index}; } render(){ return (
{this.state.index+1}. {this.state.pairName.name1} - {this.state.pairName.name2}
) } }