React scaffolding implements traversal, to addkey
Corresponding code:
{
this.props.users.map((userObj) => {
return (
<div key={
userObj.id} className="card">
<a rel='noreferrer' href={
userObj.html_url} target='_blank'>
<img src={
userObj.avatar_url} style={
{
width:'100px'}} alt="head_portrait"/>
</a>
<p className='card-text'>{
userObj.login}</p>
</div>
)
)
}
These are the study notes of the bilibili Shang Silicon Valley React learning video~