memo
This commit is contained in:
+1
-2
@@ -1,6 +1,5 @@
|
||||
import * as React from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import Animated, {useAnimatedScrollHandler} from 'react-native-reanimated'
|
||||
|
||||
export default function App() {
|
||||
@@ -19,7 +18,7 @@ export default function App() {
|
||||
return <Child onScroll={handler} />
|
||||
}
|
||||
|
||||
const Child = observer(function ({onScroll}) {
|
||||
const Child = React.memo(function ({onScroll}) {
|
||||
return (
|
||||
<View style={{flex: 1, flexDirection: 'row'}}>
|
||||
<Animated.FlatList
|
||||
|
||||
Reference in New Issue
Block a user