We want to remove entries from ThreadActivityStore once the threads have been removed.
Details
Details
Navigate to thread, log ThreadActivityStore, delete thread, log ThreadActivityStore.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
lib/reducers/thread-activity-reducer.js | ||
---|---|---|
37–40 ↗ | (On Diff #31752) | Maybe this check is superfluous and we should just let execution spill into the subsequent for loop? I guess this prevents state pointing to different object if there are no updates, but there will almost certainly be updates with leaveThreadActionTypes.success and deleteThreadActionTypes.success? Can remove this if preferred |
lib/reducers/thread-activity-reducer.js | ||
---|---|---|
37–40 ↗ | (On Diff #31752) | No it's better to keep this. If for instance there is a useSelector(state => state.threadActivityStore) (or a createSelector equivalent), they would be able to "short-circuit" and skip any changes here because you're returning the exact same state object. If you remove it here, that "short-circuit" will be gone |