get value() {
        if (!hasValueInState) {
          // auto populating default values if an initial value is not provided
          setDefaultValue();
        } else if (!formState.initialValues.has(name)) {
          // keep track of user-provided initial values on first render
          formState.initialValues.set(name, formState.current.values[name]);
        }

        // auto populating default values of touched
        if (formState.current.touched[name] == null) {
          formState.setTouched({ [name]: false });
        }

        // auto populating default values of pristine
        if (formState.current.pristine[name] == null) {
          formState.setPristine({ [name]: true });
        }

        /**
         * Since checkbox and radio inputs have their own user-defined values,
         * and since checkbox inputs can be either an array or a boolean,
         * returning the value of input from the current form state is illogical
         */
        if (isCheckbox || isRadio) {
          return ownValue;
        }

        return hasValueInState ? formState.current.values[name] : '';
      }
@todo Handle the case where two checkbox inputs share the same
name, but one has a value, the other doesn't (throws currently).
<input {...input.checkbox('option1')} />
<input {...input.checkbox('option1', 'value_of_option1')} />