Im kinda new at react, so im looking to get a push in the right direction here. What i am trying to do is onChange of the checkbox, i need to query which checkboxes are checked and create an array with the selected values. Current code below

```
import React, {useState, useEffect} from 'react'
import axios from 'axios';

function Formats(props) {
  const FormatsApi = 'props.serverUrl'

  // Get data from api
  const [formats, setFormats ] = useState([])

  // Need to query checkboxes and set array with values
  function handleChange(e) {
      // set array here
  }

  useEffect(() => {
    const fetchData = async () => {
      const result = await axios(FormatsApi)
      console.log(result.data)
      setFormats(result.data)
    }
    fetchData();
  }, []);

  return (
    <div className="row">
      {formats.map(format => (
        <div className="col-1 d-flex align-items-center justify-content-end" key={format.key_string}>
          <label className="mr-2 mb-0">{format.key_string}</label>
          <input type="checkbox" name={format.key_string} value={format.id} onChange={handleChange}/>
        </div>
      ))}

    </div>
  )
}

export default Formats

```