title: React-Redux: Passing arguments from handler to action creator
body: <p>I have scoured the web and various sources; none seem to apply to my question. The closest might be this (which doesn't have an answer): 
  <a href="https://stackoverflow.com/questions/41962016/react-redux-function-call">React + Redux function call</a></p>
  
  <p>So: I am attempting to pass arguments along to one of my action creator fields, a function called update which will determine if the blurred row had a value changed, and if so it will call my api to update. The arguments I wish to pass are the event (which contains the row I need as target.ParentElement) and an integer that represents the index of the row in my state's <strong>projects</strong> property.</p>
  
  <p>Action creator in my redux store: </p>
  
  <pre><code>export const actionCreators = {
      update: (e: React.FocusEvent&lt;HTMLInputElement&gt; | undefined, i: number): AppThunkAction&lt;KnownAction&gt; =&gt; (dispatch, getState) =&gt; {
          let test = event;
          // Will put logic and api call in here and dispatch the proper action type
      }
  }
  </code></pre>
  
  <p>And trying to call it like so:</p>
  
  <pre><code>// Inside a function rendering each row in my form 
  ...
  &lt;input key={project.number} name={name} className='trackerCell' onBlur={(event) =&gt; { this.props.update(event, i) }} defaultValue={project.number}/&gt;
  </code></pre>
  
  <p>Where <strong>i</strong> is the index value, passed to the rendering function.</p>
  
  <p>This all compiles find, however when I execute and get into the <strong>update</strong> function, <strong>e</strong> and <strong>i</strong> are both undefined; <strong>event</strong> is defined though, and looks as I would expect <strong>e</strong> to look.</p>
  
  <p>FWIW, the format I'm attempting here works elsewhere in my application: </p>
  
  <pre><code>requestProjects: (programNumber: number, programString: string): AppThunkAction&lt;KnownAction&gt; =&gt; (dispatch, getState) =&gt; {
  </code></pre>
  
  <p>when called by componentWillUpdate() properly receives a number and string that I am able to use in my logic.</p>
  
  <p>Bonus: In all my action creator functions constructed this way, <strong>arguments</strong> has 3 objects in it: <strong>dispatch</strong>, <strong>getState</strong> and <strong>undefined</strong>. Why don't the arguments in the call signature show up? Am I thinking about these arguments differently?</p>
  
  <p>And yes, I know I can just attach the index value to an attribute in my input and that will appear in the <strong>event</strong> object, but this seems hacky, and I want to actually understand what is going on here.</p>
  
  <p>Thanks</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>In response to Will Cain's comment: The index variable, i, is passed to the row rendering function from it's parent, as such:</p>
  
  <pre><code>private renderProjectRow(project: ProjectTrackerState.Project, i: number) {
      let cells: JSX.Element[] = [];
      let someKey = project.number + '_started', name = project.number + '_number';
      cells.push(&lt;input key={project.number} name={name} className='trackerCell' onBlur={ this._handleBlur.bind(this) } defaultValue={project.number}/&gt;);
  // Rendering continues down here
  </code></pre>
  
  <p>It's a valid number type up to the event point (I can tell as I debug in the browser).</p>
  
  <p>The event variable in the update function comes from.. I don't know where? That's a mystery I would love to solve. Even though it is not a defined parameter to the update function, when I enter the <strong>update</strong> method, event is defined as such in the debugger:</p>
  
  <pre><code>Event {isTrusted: false, type: "react-blur", target: react, currentTarget: react, eventPhase: 2, …}
  </code></pre>
  
  <p>It is clearly the event that triggered the handler, but how it reaches the <strong>update</strong> function is beyond me.</p>