I want to change the SafeAreaView style when I press button from another page and when I press the button again so it return back the old style of the SafeAreaView .
I would love some help with it .
this is the Reshima page
function Reshima({ paramsList = { list: [] } }) {
return (
<SafeAreaView style={styles.flat}>
<FlatList
data={filteredList}
renderItem={({ item, index }) => renderItem({ index, item })}
keyExtractor={(item) => item.Water_Source_Code.toString()}
ListEmptyComponent={EmptyListMessage}
/>
</SafeAreaView>
)}
this is AppNavigator page of the button :
const HomeStack = () => {
<TouchableOpacity onPress={() => {
dispatch(setFilterViewVisible(true));
}}>
<Icon
color="white"
style={styles.homeIcon}
name={
Platform.OS === 'android'
? 'md-search-outline'
: 'md-search-outline'
}
size={30}
/>
</TouchableOpacity>
}