I am new to React Native and I am using typescript for React Native. Currently, I am having a difficulty to do if else statement for search function. Below is my code for if else statement for search function.
{searchParams !== "" (
<View>
<Text>Sorry, error occur</Text>
</View>
) : (
<View>
<Text>Success!</Text>
</View>
)}