title: Getting Flow warning messages with Reducer
body: <p>Using the React Context API, I've built this reducer:</p>
  
  <pre><code>export const usersReducer = (state: UsersState, action: UsersAction) =&gt; {
    switch (action.type) {
      case TOGGLE_MODAL: {
        return {
          ...state,
          isModalOpen: !state.isModalOpen
        };
      }
  
      case CANCEL_REQUEST: {
        return {
          ...state,
          isCancelRequest: action.payload
        };
      }
  
      case UPDATE_COMPANY: {
        return {
          ...state,
          companyId: action.payload
        };
      }
  
      default: {
        return state;
      }
    }
  }
  </code></pre>
  
  <p>The associated Actions look like this:</p>
  
  <pre><code>// Note: `ActionType` = `string`
  export const TOGGLE_MODAL: ActionType = 'TOGGLE_MODAL';
  export const CANCEL_REQUEST: ActionType = 'CANCEL_REQUEST';
  export const UPDATE_COMPANY: ActionType = 'UPDATE_COMPANY';
  
  type ToggleModalAction = {type: typeof TOGGLE_MODAL};
  type CancelRequestAction = {type: typeof CANCEL_REQUEST, payload: boolean};
  type UpdateCompanyAction = {type: typeof UPDATE_COMPANY, payload: number};
  
  export type UsersAction = 
       | ToggleModalAction
       | CancelRequestAction
       | UpdateCompanyAction;
  </code></pre>
  
  <p>On the two <code>action.payload</code> instances, Flow is saying this:</p>
  
  <pre><code>Cannot get `action.payload` because property `payload` is missing in  `ToggleModalAction`
  </code></pre>
  
  <p>I thought the way I defined my 3 "...Action" types, I could include <code>payload</code> where warranted and exclude it where it's not needed, like in <code>ToggleModalAction</code>.</p>
  
  <p>Any ideas how to solve this?</p>