Quantcast
Channel: Component not rendering in react-native - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Haider Ali for Component not rendering in react-native

$
0
0

Your code has some styling issues. Try changing you render function with this

render() {    const { cardNo, amount } = this.state    return (<View style={{ alignSelf: 'stretch' }}><TextInput          placeholder="Card Number"          style={{ height: 40, borderColor: '#333', borderWidth: 1 }}          value={cardNo}          onChangeText={this.handleCardNo}        /><TextInput          placeholder="Amount"          style={{ height: 40, borderColor: '#333', borderWidth: 1 }}          value={amount}          onChangeText={this.handleAmount}        /><Button title="Send" onPress={this.handleSend} /></View>    )  }

Viewing all articles
Browse latest Browse all 2

Trending Articles



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