Return JSX component onPress react-native
问题 I want to prompt users to get input onPress but returning JSX from an onPress never worked so whats a possible workaround to return JSX based on button click. Here's my code: import React, { useState } from 'react'; import { StyleSheet, KeyboardAvoidingView, View, Text, TouchableOpacity } from 'react-native'; import InputPrompt from './InputPrompt' const Newact = (props) => { const [visible, setVisible] = useState(false) return( <View> <View style={styles.button} > <TouchableOpacity style=