title: Can't find variable addproduct error in while using redux in react native
body: <p>I have the following code inside flatlist for adding product into cart using redux</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;View style={styles.priceContainer}&gt;
    &lt;Text style={styles.gridItemTitle}&gt;${item.price}&lt;/Text&gt;
    &lt;Button size="small" onPress={()=&gt; addproduct(item)} style={styles.addBtn} accessoryLeft={PlusIcon} /&gt;
  &lt;/View&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>and this is how i am using map Dispatch to props in the bottom of functional component</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const mapStateToProps = (state) =&gt; {
      console.log(state);
      return {
          products: state.groceryReducer.productList
      }
  }
      
  const mapDispatchToProps = (dispatch) =&gt; {
      return {
          addproduct: (product) =&gt; dispatch(addToCart(product))
      }
  }
  export default connect(mapStateToProps, mapDispatchToProps)(Products)</code></pre>
  </div>
  </div>
  </p>
  <p>but it is showing an <code>error can't find variable addproduct </code>
  can you tell why i am getting this error or what i am doing wrong any solution or suggestions?
  Thanks in advance</p>