When I press a button
<Pressable
onPress={() => {
this.onPressHandler();
}}>
I want to setState to its previous value, but it doesn’t happen
onPressHandler = () => {
this.setState(
prevState => (
{
data: prevState.data
}
)
);
};
What am I doing wrong?