Working on a React Native app in Expo, I am encountering a strange problem: everything is fine in browser preview, but on the phone the conditional return does not happen.
return (
<ScrollView>
<View>
<QCard
sculpture={sculpture}
query={query}
handleChange={handleChange}
handleSubmit={handleSubmit}
/>
{search === sculpture.name ? (
<RCard sculpture={sculpture} />
) : (
<View>
<Text>{count}</Text>
</View>
)}
</View>
</ScrollView>
);
}
A log in the terminal returns the correct values, but no return is triggered.
To reproduce, do the following:
- clone the repository
- run nvm use --lts && expo start
- open the app on an android phone Expo app
- click 'next' on the first page (count 0)
- type in 'August' and click on 'submit' on the second page (count 1)
https://github.com/ydrea/rnthegame.git ('design' branch)
AGame.js