Use React.memo on AppInput

This commit is contained in:
Brandon Presley 2022-12-30 19:39:20 +13:00
parent 5e37490c2d
commit 9be10610d2
1 changed files with 4 additions and 2 deletions

View File

@ -1,10 +1,10 @@
import {ComponentProps, Ref} from 'react' import React, {ComponentProps, Ref} from 'react'
import {TextInput} from 'react-native-paper' import {TextInput} from 'react-native-paper'
import {CombinedDefaultTheme} from './App' import {CombinedDefaultTheme} from './App'
import {MARGIN} from './constants' import {MARGIN} from './constants'
import useDark from './use-dark' import useDark from './use-dark'
export default function AppInput( function AppInput(
props: Partial<ComponentProps<typeof TextInput>> & { props: Partial<ComponentProps<typeof TextInput>> & {
innerRef?: Ref<any> innerRef?: Ref<any>
}, },
@ -23,3 +23,5 @@ export default function AppInput(
/> />
) )
} }
export default React.memo(AppInput)