Created
August 17, 2017 11:22
-
-
Save arifkoken/42d1fea05a0557e14c6ee593cd97b215 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { TextInput } from 'react-native'; | |
import { connect } from 'react-redux'; | |
import { sayiChanged } from '../actions'; | |
class Islem extends Component { | |
render() { | |
console.log(this.props.sayi); | |
return ( | |
<TextInput | |
style={{ marginTop: 30 }} | |
placeholder="Sayı Gir" | |
value={this.props.sayi} | |
onChangeText={sayi => this.props.sayiChanged(sayi)} | |
/> | |
); | |
} | |
} | |
const mapStateToProps = ({ IslemResponse }) => { | |
const { sayi } = IslemResponse; | |
return { sayi }; | |
}; | |
export default connect(mapStateToProps, { sayiChanged })(Islem); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment