title: React navigation pops to top when redux store is updated
body: <p>I'm working on edit profile when i change my redux store the navigation stack pops to top screen in stack.Like if i'm on edit profile screen on redux state change it goes back to settings screen.
  what am i doing wrong here?</p>
  <p><strong>Reducer</strong></p>
  <pre><code>case TYPES.UPDATE_PROFILE:
    const data = {...state};
    const payload = actions.payload;
    return {
      ...state,
      user: {
        ...data.user,
        first_name: payload.first_name,
        last_name: payload.last_name,
  
        ['user_info']: {
          ...data.user.user_info,
          gender: payload.gender,
          date_of_birth: payload.date_of_birth,
          phone_number: payload.phone_number,
        },
      },
    };
  </code></pre>
  <p><strong>action code</strong></p>
  <pre><code>dispatch({
    type: TYPES.UPDATE_PROFILE,
    payload: params,
  });
  </code></pre>
  <p>Navigation file (using react navigation v5)</p>
  <pre><code> function ProfileScreens() {
  return (
    &lt;Stack.Navigator&gt;
      &lt;Stack.Screen
        name=&quot;Settings&quot;
        component={Settings}
        options={{headerShown: false}}
      /&gt;
      &lt;Stack.Screen
        name=&quot;ProfileView&quot;
        component={Profile}
        options={{headerShown: false}}
      /&gt;
      &lt;Stack.Screen
        name=&quot;EditProfile&quot;
        component={EditProfile}
        options={{headerShown: false}}
      /&gt;
    &lt;/Stack.Navigator&gt;
  );
  </code></pre>
  <p>}</p>
  <p>can someone please help me with this?</p>