const LiveTV = () => {
const [focus, setFocus] = useState(false);
const Item = ({ item }) => {
return (
<Pressable
style={[styles.channelView, focus ? styles.wrapperFocused : null]}
onPress={() => {
setChannelPlaying(item);
}}
onPressIn={() => {
setFocus(true);
console.log(focus);
}}
onPressOut={() => {
setFocus(false);
console.log(focus);
}}
>
</Pressable>
);
};
When the onPressIn is called, it's meant to change the "focus" value to true, but it remains at false and also when the onPressOut is called, it is meant to set the "focus" to false