title: React native: useSelector redux is empty
body: <p>I am new and i want to using react native to create android application so after creating project i installed redux and redux thunk and do every config that redux wants to work .</p>
  <p>I create a action file :</p>
  <pre class="lang-js prettyprint-override"><code>    export const GETSURVEYOR = 'GETSURVEYOR';
      
      const URL = &quot;http://192.168.1.6:3000/&quot;;
      
      export const fetchSurveyor = () =&gt; {
          return async dispatch =&gt; {
              const controller = new AbortController();
              const timeout = setTimeout(
                  () =&gt; { controller.abort(); },
                  10000,
              );
              const response = await fetch(`${URL}GetSurveyorList`,
                  {
                      method: 'POST',
                      headers: {
                          'Content-Type': 'application/json'
                      },
                      body: JSON.stringify({}),
                      signal: controller.signal
                  });
              clearTimeout(timeout);
              const resData = await response.json();
      
              dispatch({
                  type: GETSURVEYOR,
                  surveyorList: resData.SurveyorList
              });
          }
      }
  </code></pre>
  <p>after that i create reducer to handle this data :</p>
  <pre class="lang-js prettyprint-override"><code>    import {GETSURVEYOR} from '../actions/surveyor'
      
      const initialState = {
          surveyorList: []
      }
      
      export default (state = initialState, action) =&gt; {
          switch (action.type) {
              case GETSURVEYOR:
                  return {
                      ...state,
                      surveyorList: action.surveyorList
                  };
  </code></pre>
  <p>Now i am using by <code>useSelector, useDispatch</code> from <code>'react-redux</code> .</p>
  <pre class="lang-js prettyprint-override"><code>    import React, { useState, useEffect, useCallback } from 'react';
      import { useSelector, useDispatch } from 'react-redux';
      
      import * as surveyorActions from '../store/actions/surveyor';
      
      export default () =&gt; {
          const [surveyorCount, setSurveyorCount] = useState(0);
          const survayers = useSelector(state =&gt; state.surveyor.surveyorList);
          const dispatch = useDispatch();
      
      
          const loadSurvayer = useCallback(async () =&gt; {
              await dispatch(surveyorActions.fetchSurveyor());
              console.log('run use Callback');
              console.log('returned :', survayers );
              // setSurveyorCount(survayers.length);
          }, [dispatch]);
      
          useEffect(() =&gt; {
              loadSurvayer();
          }, [dispatch]);
      
          return [loadSurvayer, surveyorCount];
      }
  </code></pre>
  <p>When for first time this paged is rendered , of course that <code>survayers</code> is empty  but after fetch data in action and set state to reducer , <code>survayers </code> nut to be an empty.
  But i get empty still ? I am sure data is fetched from services but i got empty from <code>survayers</code> ?</p>
  <pre><code> LOG  Running &quot;RNAuditMngm&quot; with {&quot;rootTag&quot;:1}
   LOG  run use Callback
   LOG  returned : []
   LOG  run use Callback
   LOG  returned : []
  </code></pre>
  <p>if i change my useEffect code to this:</p>
  <pre class="lang-js prettyprint-override"><code>    useEffect(() =&gt; {
          loadSurvayer();
      }, [dispatch,survayers]);
  </code></pre>
  <p>I fall to loop !!!! How could i change code without loop?</p>