title: How to shared state data with redux and react-hooks
body: <p>im trying to use react hooks to load my state and redux to store state data. But it is a little difficult to find the right way to do this, if it is possible. Can someone help me?</p>
  <p>Example:</p>
  <p>1 - screen A. Title = myTitleScreenA.</p>
  <p>2 - screen B. changeTitle(myTitleScreenB).</p>
  <p>3 - screen B. dispatch new title to store.</p>
  <p>4 - screen B. navigation go back (B -&gt; A).</p>
  <p>5- screen A. loads new title myTitleScreenB.</p>
  <p>getting data from already stored state, from screen A:</p>
  <pre><code>const diaryData = useSelector(({diaryState}) =&gt; diaryState.data);
  const diaryIndex = useSelector(({diaryState}) =&gt; diaryState.index);
  
  
  const [diary, setDiary] = useState(diaryData[diaryIndex]);
  
  useEffect(() =&gt; {
      console.log('im here');
      setLoad(true);
      setDiary(diaryData[diaryIndex]);
      setLoad(false);
    });
  </code></pre>
  <p>at screen B, changing the state and dispatching info:</p>
  <pre><code> diary.growDimens = growDimens;
   diary.lightingType = lightingType;
   diary.lumens = lumens;
  
   diaryData[diaryIndex] = diary;
   dispatch(diaryFetchSuccess(diaryData));
  </code></pre>
  <p>I expected that when performing the dispatch, the diary state of screen a would be modified. But it's not.</p>