I have an array of players which I map through. The user is constantly adding new players to this array. I map through the array and return a set of elements. I'd like each player from the list to render one at a time with a 500ms interval in between. Here's the code I have so far:
export const ShowDraftedPlayers = props => {
const {
draftedPlayers,
getPlayerProfile,
teams,
draftPos,
myTeam } = props;
let playersDraftedList = draftedPlayers.map((player, index) => {
return (
<div key={index} className='drafted'>
<p style={style}>TEAM {player.teamDraftedBy} </p>
<b className='player-lastName'> {player.displayName} </b>
{player.position}
</p>
</div>
)
})
return (
<div className='draftedPlayers-container'>
{playersDraftedList}
</div>
)
}