Use React.memo for Switch

This commit is contained in:
Brandon Presley 2022-12-30 19:42:30 +13:00
parent a5ddf5c94d
commit dd7cb0406b
1 changed files with 4 additions and 1 deletions

View File

@ -1,8 +1,9 @@
import React from 'react'
import {Platform, Pressable} from 'react-native'
import {Switch as PaperSwitch, Text, useTheme} from 'react-native-paper'
import {MARGIN} from './constants'
export default function Switch({
function Switch({
value,
onChange,
children,
@ -33,3 +34,5 @@ export default function Switch({
</Pressable>
)
}
export default React.memo(Switch)