Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6211

If Else Statement for SearchParams [React Native]

$
0
0

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>
)}

Viewing all articles
Browse latest Browse all 6211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>