title: Any way I can declare the event object rather than in the params of a function?
body: <p>is there anyways I can put the e object inside of the handleSubmit function? I already have a parameter there, and if I add the e to the params then it will give me an error depending of order of params and say "TypeError: e.preventDefault is not a function" if handleSubmit=(e, priorityLevelData)=> {. .... or "TypeError: Cannot read property 'preventDefault' of undefined" if handleSubmit=(priorityLevelData, e)=> {</p>
  
  <pre><code>    import React from "react";
      import PrioritySelector from "./PrioritySelector";
      import { connect } from "react-redux";
  
      class TodoForm extends React.Component {
  
  
          /*submit handler to grab input from the input references and store them
          in the "todoData" object. Then dispatches an action type and payload
          capturing the data. Then clears the input*/
  
          handleSubmit=(e, priorityLevelData)=&gt; {
  e.preventDefault()
              const todoTitle = this.getTodoTitle.value;
              const description = this.getDescription.value;
              const priorityLevel = priorityLevelData;
              const todoData = {
                  id: Math.floor(Math.random()*1000),
                  todoTitle,
                  description,
                  priorityLevel,
                  editing: false
              }
              this.props.dispatch({type:"ADD_TODO", todoData })
              this.getTodoTitle.value = "";
              this.getDescription.value = "";
  
          }
  
  
  
  
  
          render() {
              console.log(this.props, "TODOFORMPROPS")
              return(
                  &lt;div&gt;
                      &lt;form onSubmit={this.handleSubmit}&gt;
                          &lt;input type="text" ref={(input)=&gt; this.getTodoTitle=input} placeholder="Enter Todo" required/&gt;
                          &lt;input type="text" ref={(input)=&gt; this.getDescription=input} placeholder="Enter Description" required/&gt;
                          &lt;PrioritySelector  getData={this.handleSubmit} /&gt;
                          &lt;button&gt;Add Todo&lt;/button&gt;
                      &lt;/form&gt;
                  &lt;/div&gt;
              )
          }
      }
  
      const mapStateToProps = (state) =&gt; {
          return {
              priorityLevel: state
          }
      }
  
  
      export default connect(mapStateToProps)(TodoForm);
  </code></pre>