your render method should looks like this:
render () {
let s="kaveh";
return (
<Text>
{s === 'kaveh' ? 'Hello kaveh' : 'Hello world'}
</Text>
);
}
this is based on your code.
More Related Contents:
- What is the difference between Expo and React Native?
- Setting environment variable in react-native?
- React Native version mismatch
- React navigation goBack() and update parent state
- Render HTML in React Native
- How to upload file to server using react-native
- How do I display an animated gif in React Native?
- react-native-fbsdk error: No resource found that matches the given name: attr ‘android:keyboardNavigationCluster’
- React Native TextInput that only accepts numeric characters
- How to remove ‘Warning: Async Storage has been extracted from react-native core…’?
- StackNavigator through Component gives undefined error
- Renaming a React Native project?
- Does react native support base64 encoded images?
- FlatList calls `onEndReached` when it’s rendered
- React Native – Device back button handling
- How to use global variables in React Native?
- Is React Native’s Async Storage secure?
- Pass Data between Pages in React native
- Unable to resolve module `@babel/runtime/helpers/interopRequireDefault`
- React Native Android Build Error MainActivity.java:29: error: cannot find symbol
- react native get TextInput value
- Detect ScrollView has reached the end
- Facing issue ” Failed to install the app. Make sure you have the Android development environment ” in react native
- Network Response Time Out Error (create-react-native-app) (expo)
- However, this package itself specifies a `main` module field that could not be resolved
- How to download a file with React Native?
- React Native – React Navigation transitions
- JSON Parse error: Unrecognized token’
- React Native – Difference between onChange vs onChangeText of TextInput
- fetch response.json() gives responseData = undefined