Sets up react-redux-firebase-firestore to accommodate for some of the single auth / multiple athletes functionality.
Creates useUpdateSubscription - as react-redux-firebase-firestore is optimised for consumers being created and removed, some of the state (e.g. constraints with respect to metadata) is "cached" and doesn't update with updated meta. This hook extends this functionality to explicitly update the subscription when the dependencies change, in a useEffect-like manner.
I've tried to think of some tests for this, but it's a bit niche and hard to test. When the functionality is fully wired in, the behaviour is tested using e2e tests (which, in this case, I feel are most representative)
Sets up
react-redux-firebase-firestore
to accommodate for some of the single auth / multiple athletes functionality.Creates
useUpdateSubscription
- asreact-redux-firebase-firestore
is optimised for consumers being created and removed, some of the state (e.g. constraints with respect to metadata) is "cached" and doesn't update with updated meta. This hook extends this functionality to explicitly update the subscription when the dependencies change, in auseEffect
-like manner.I've tried to think of some tests for this, but it's a bit niche and hard to test. When the functionality is fully wired in, the behaviour is tested using e2e tests (which, in this case, I feel are most representative)