title: Using useEffect with React-redux
body: <p>I have a problem. As I understood hook useEffect doen't run.
  I have action that should take data from server.</p>
  
  <pre><code>export const getProducts = () =&gt; {
      return dispatch =&gt; {
          dispatch(getProductsStarted());
  
          fetch('https://shopserver.firebaseapp.com/get-products')
              .then(res =&gt; {
                  dispatch(getProductsSuccess(res.json()));
              })
              .catch(err =&gt; {
                  dispatch(getProductsFailure(err.message));
              });
      }
  }
  
  const getProductsSuccess = todo =&gt; ({
      type: "ADD_TODO_SUCCESS",
      payload: {
          ...todo
      }
  });
  
  const getProductsStarted = () =&gt; ({
      type: "ADD_TODO_STARTED"
  });
  
  const getProductsFailure = error =&gt; ({
      type: "ADD_TODO_FAILURE",
      payload: {
          error
      }
  });
  </code></pre>
  
  <p>I have a reducer.</p>
  
  <pre><code>const initialState = {
      loading: false,
      products: [],
      error: null
  }
  
  export const ProductReducer = (state = initialState, action) =&gt; {
      switch (action.type) {
          case "ADD_TODO_SUCCESS":
              return {
                  ...state,
                  loading: false,
                  error: null,
                  todos: [...state.products, action.payload.products]
              }
          case "ADD_TODO_STARTED":
              return {
                  ...state,
                  loading: true
              }
          case "ADD_TODO_FAILURE":
              return {
                  ...state,
                  loading: false,
                  error: action.payload.error
              }
          default:
              return state
      }
  }
  </code></pre>
  
  <p>And I have a Component where I want to render a result.</p>
  
  <pre><code>import React from 'react';
  import { CardItem } from "./cardItem";
  import { useSelector } from 'react-redux';
  import { useEffect } from 'react';
  import { getProducts } from '../Redux/Actions/productAction'
  
  export const ProductCard = () =&gt; {
  
      useEffect(() =&gt; {
          getProducts();
          console.log('111111')
      })
  
      const data = useSelector(state =&gt; state.ProductReducer.products);
  
      return (
          &lt;div&gt;
              {data.map( element =&gt;
                  CardItem (element)
              )}
          &lt;/div&gt;
      )
  }
  </code></pre>
  
  <p>After rendering page nothing happens. ReduxDevTools shows that there was no send actions. Please, help me to fix it. Thank you.</p>