props나 state 등 특정 변수와 삼항연산자를 사용해 조건에 맞는 컴포넌트를 간단히 랜더링을 할 수 있다.
<View
style={{
flex: 1,
justifyContent: 'center',
alignContent: 'center',
}}>
{isWished ? (
<TouchableRipple onPress={_remove_wish}>
<FontAwesome
name="heart"
size={26}
style={{color: palette.app_main_color}}
/>
</TouchableRipple>
) : (
<TouchableRipple onPress={_add_wish}>
<FontAwesome
name="heart-o"
size={26}
style={{color: palette.app_main_color}}
/>
</TouchableRipple>
)}
</View>