Memoize rows
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import {useCallback, useEffect, useMemo, useRef, useState} from 'react'
|
import {memo, useCallback, useEffect, useMemo, useRef, useState} from 'react'
|
||||||
import {
|
import {
|
||||||
LayoutAnimation,
|
LayoutAnimation,
|
||||||
ListRenderItem,
|
ListRenderItem,
|
||||||
@@ -444,7 +444,7 @@ function keyExtractor(item: FeedPostSliceItem) {
|
|||||||
return item._reactKey
|
return item._reactKey
|
||||||
}
|
}
|
||||||
|
|
||||||
function VideoItem({
|
let VideoItem = ({
|
||||||
player,
|
player,
|
||||||
post,
|
post,
|
||||||
embed,
|
embed,
|
||||||
@@ -460,7 +460,7 @@ function VideoItem({
|
|||||||
scrollGesture: NativeGesture
|
scrollGesture: NativeGesture
|
||||||
moderation?: ModerationDecision
|
moderation?: ModerationDecision
|
||||||
feedContext: string | undefined
|
feedContext: string | undefined
|
||||||
}) {
|
}): React.ReactNode => {
|
||||||
const postShadow = usePostShadow(post)
|
const postShadow = usePostShadow(post)
|
||||||
const {width, height} = useSafeAreaFrame()
|
const {width, height} = useSafeAreaFrame()
|
||||||
const {sendInteraction} = useFeedFeedbackContext()
|
const {sendInteraction} = useFeedFeedbackContext()
|
||||||
@@ -525,6 +525,7 @@ function VideoItem({
|
|||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
VideoItem = memo(VideoItem)
|
||||||
|
|
||||||
function VideoItemInner({
|
function VideoItemInner({
|
||||||
player,
|
player,
|
||||||
|
|||||||
Reference in New Issue
Block a user