score:0

{statecolor.map((colorObject)=>{
        return (
          <h2 style={{backgroundColor:colorObject.bg}}>{statecolors}</h2>
        )
      })}

score:2

      {statecolor.map((colorObject)=>{
        return (
          <h2 style={{backgroundColor:colorObject.bg}}>{statecolors}</h2>
        )
      })}

Related Query

More Query from same tag