Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3399283
D9100.id30848.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
883 B
Referenced Files
None
Subscribers
None
D9100.id30848.diff
View Options
diff --git a/native/chat/swipeable-thread.react.js b/native/chat/swipeable-thread.react.js
--- a/native/chat/swipeable-thread.react.js
+++ b/native/chat/swipeable-thread.react.js
@@ -79,16 +79,20 @@
iconSize,
]);
- return (
- <Swipeable
- buttonWidth={60}
- innerRef={swipeable}
- onSwipeableRightWillOpen={onSwipeableRightWillOpen}
- rightActions={swipeableActions}
- >
- {props.children}
- </Swipeable>
+ const swipeableThread = React.useMemo(
+ () => (
+ <Swipeable
+ buttonWidth={60}
+ innerRef={swipeable}
+ onSwipeableRightWillOpen={onSwipeableRightWillOpen}
+ rightActions={swipeableActions}
+ >
+ {props.children}
+ </Swipeable>
+ ),
+ [onSwipeableRightWillOpen, props.children, swipeableActions],
);
+ return swipeableThread;
}
export default SwipeableThread;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 2:50 AM (22 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2609382
Default Alt Text
D9100.id30848.diff (883 B)
Attached To
Mode
D9100: [native] Memoize `SwipeableThread`
Attached
Detach File
Event Timeline
Log In to Comment