score:0

Accepted answer
const NewFighterForm = ({
  formData,
  updateNewFighterForm,
  handleSubmit,
  editMode,
  lists, // <-- get lists from props
}) => {
  ...

  return (
    <div>
      <h1>Add Fighter</h1>
      <form
        onSubmit={event => {
          event.preventDefault()
          debugger
          handleSubmit(formData)
        }}
      >
        <ol>
          ...

          <label>List for Fighter: </label>
          <br></br> 
          <select
            name="lists"
            onChange={handleChange}
          >
            <option disabled>Choose List for Fighter</option>
            {lists.map(listItem => ( // <-- map the list
              <option value={listItem.value}> // <-- the option value
                {listItem.label} // <-- what you want displayed
              </option>
            ))}
          </select>

          ...
        </ol>
      </form>
    </div>       
  )
};

const mapStateToProps = state => {
  // debugger
  return {
    formData: state.newFighterForm,
    lists: state.myLists
  }
};

Related Query

More Query from same tag