Problem reason:
Navigaton does not destroy the screens, so the internal state of the
lists is preserved. For example, if the user creates a bridge and goes
back to the Bridge List, the Bridge List still displayes outdated list
of bridges stored in its local state.
Detected in the branch:
main
Conditions to reproduce the issue:
Go to the Bridge List, add a bridge and go back to the Bridge List.
The newly created bridge does not appear in the list. Same for editing
the name of the bridge. Same for Animal List.
Possible workarounds without the fix:
Go to Dashboad and return to the Bridge List; the updated list is
displayed.
Changes:
Use the isFocused hook and destroy the stateful component when the
Bridge List looses focus. Thus, the state is reinitialized when the
user is back. Same for animals.
Problem reason: Navigaton does not destroy the screens, so the internal state of the lists is preserved. For example, if the user creates a bridge and goes back to the Bridge List, the Bridge List still displayes outdated list of bridges stored in its local state.
Detected in the branch: main
Conditions to reproduce the issue: Go to the Bridge List, add a bridge and go back to the Bridge List. The newly created bridge does not appear in the list. Same for editing the name of the bridge. Same for Animal List.
Possible workarounds without the fix: Go to Dashboad and return to the Bridge List; the updated list is displayed.
Changes: Use the isFocused hook and destroy the stateful component when the Bridge List looses focus. Thus, the state is reinitialized when the user is back. Same for animals.
Risk factors: Bridge List, Bridge Form, Animal List, Animal Form.
Risk: Medium.
Recommendations for QA: Please make sure that the fix works properly on iOS.