Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3352468
D13465.id44558.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
930 B
Referenced Files
None
Subscribers
None
D13465.id44558.diff
View Options
diff --git a/lib/actions/holder-actions.js b/lib/actions/holder-actions.js
--- a/lib/actions/holder-actions.js
+++ b/lib/actions/holder-actions.js
@@ -137,10 +137,13 @@
const identityContext = React.useContext(IdentityClientContext);
const getAuthMetadata = identityContext?.getAuthMetadata;
- const holdersToRemove = useSelector(state =>
- Object.entries(state.holderStore.storedHolders)
- .filter(([, holderInfo]) => holderInfo.status !== 'PENDING_REMOVAL')
- .map(([blobHash, { holder }]) => ({ blobHash, holder })),
+ const storedHolders = useSelector(state => state.holderStore.storedHolders);
+ const holdersToRemove = React.useMemo(
+ () =>
+ Object.entries(storedHolders)
+ .filter(([, holderInfo]) => holderInfo.status !== 'PENDING_REMOVAL')
+ .map(([blobHash, { holder }]) => ({ blobHash, holder })),
+ [storedHolders],
);
return React.useCallback(async () => {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 6:03 AM (20 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2573552
Default Alt Text
D13465.id44558.diff (930 B)
Attached To
Mode
D13465: [lib] Avoid regenerating holdersToRemove whenever Redux state changes
Attached
Detach File
Event Timeline
Log In to Comment