Skip to content

Instantly share code, notes, and snippets.

@arifkoken
Created August 17, 2017 11:22
Show Gist options
  • Save arifkoken/42d1fea05a0557e14c6ee593cd97b215 to your computer and use it in GitHub Desktop.
Save arifkoken/42d1fea05a0557e14c6ee593cd97b215 to your computer and use it in GitHub Desktop.
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