App: [$500] Update pages listening for `network.isOffline` in `componentDidUpdate()` to use `NetworkConnection.onReconnect()`

Problem

  • Various components are currently subscribing to changes in the network key to determine whether some logic needs to run as part of a “reconnect”.

  • The network key doesn’t tell us if one or more of the requests we are running in these places has failed to occur because the authToken expired.

Solution

The NetworkConnection.onReconnect() will now run some callbacks when either of these things happen. We can also unsubscribe these callbacks in componentWillUnmount()

We must refactor and then test all the screens we are updating.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

I got a few issues assigned yesterday which I already started reviewing. Can we please assign someone else here? @laurenreidexpensify @marcaaron