c97cab0ebb
* Don't update 'pendingById' if no changes. 'pendingById' isn't frequently updated, but using it as a proof-of-concept to fix how reducers should be written to avoid unnecessary updates. ImmutableJS apparently does all of this for us, but there are cons to using it as well, so using own wrappers for now. * Don't update 'byId' if no changes + add 'selectClaimWithId' ## Ticket 116 Claim store optimization ideas (reducing unnecessary renders) ## Changes - Ignore things like `confirmations` so that already-fetched claims aren't invalidated and causes re-rendering. The `stringify` might look expensive, but the amount of avoided re-renders outweighs it. There might be faster ways to compare, though. - With `byId[claimId]` references more stable now, memoized selectors can now use 'selectClaimWithId' to pick a specific claim to depend on, instead of 'byId' which changes on every update. * Fix memo: selectMyChannelClaims, selectActiveChannelClaim ## Issue These should never recalculate after `channel_list` has been fetched, but they do because of poor selector dependency. ## Change With the `byId` changes from the previous commit, we are now able to memoize these selectors correctly. |
||
---|---|---|
.. | ||
actions | ||
middleware | ||
reducers | ||
selectors |