get the first value when mapping through the array

Solutions on MaxInterview for get the first value when mapping through the array by the best coders in the world

showing results for - "get the first value when mapping through the array"
Jonah
27 Aug 2017
1if (index === 0) {
2    return (
3    <h1 className="box_list_header"
4    onClick={this.handleBackToRoomList}
5    >{room.room_name}</h1>
6   )
7}