Skip to content

Instantly share code, notes, and snippets.

@Realio
Created May 14, 2017 04:57
Show Gist options
  • Save Realio/658e08459790fad401d758736da60189 to your computer and use it in GitHub Desktop.
Save Realio/658e08459790fad401d758736da60189 to your computer and use it in GitHub Desktop.
import React from 'react'
import {Text, TouchableOpacity, View} from 'react-native'
import RunPicker from './RunPicker'
import {bindActionCreators} from 'redux';
import * as appActions from '../actions/appActions';
import { connect } from 'react-redux';
const CounterReset = (props) => {
const {counter, dispatch} = props;
return (
<TouchableOpacity onPress={() => dispatch(appActions.resetcounter())}>
<View>
<Text>{counter}</Text>
</View>
</TouchableOpacity>
);
};
const styles = {
};
export default connect(
(state) => ({}),
(dispatch) => ({dispatch})
)(CounterReset);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment