diff --git a/Switch.tsx b/Switch.tsx index 33edb7b..83ba25e 100644 --- a/Switch.tsx +++ b/Switch.tsx @@ -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({ ) } + +export default React.memo(Switch)