From 9be10610d2790efd33a2a82c25e8810acfe171dd Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Fri, 30 Dec 2022 19:39:20 +1300 Subject: [PATCH] Use React.memo on AppInput --- AppInput.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AppInput.tsx b/AppInput.tsx index b837967..a920385 100644 --- a/AppInput.tsx +++ b/AppInput.tsx @@ -1,10 +1,10 @@ -import {ComponentProps, Ref} from 'react' +import React, {ComponentProps, Ref} from 'react' import {TextInput} from 'react-native-paper' import {CombinedDefaultTheme} from './App' import {MARGIN} from './constants' import useDark from './use-dark' -export default function AppInput( +function AppInput( props: Partial> & { innerRef?: Ref }, @@ -23,3 +23,5 @@ export default function AppInput( /> ) } + +export default React.memo(AppInput)