Skip to content

Instantly share code, notes, and snippets.

@SyNeto
Created November 9, 2018 02:38
Show Gist options
  • Save SyNeto/1a8e597aa959656eb5f9ad8599b97e06 to your computer and use it in GitHub Desktop.
Save SyNeto/1a8e597aa959656eb5f9ad8599b97e06 to your computer and use it in GitHub Desktop.
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux';
import {
questionDetailAPICallRequestAsync,
questionDetailAPICallRequest
} from '../../actions';
export class QuestionDetail extends Component {
render() {
const {questionDetail} = this.props;
return (
<div>
<form>
<textarea value={questionDetail}></textarea>
</form>
</div>
)
}
}
const mapStateToProps = (state) => ({
questionDetail: state.questionDetail
})
const mapDispatchToProps = (dispatch) => ({
questionDetailAPICallRequestAsync: bindActionCreators(
questionDetailAPICallRequestAsync,
dispatch
),
questionDetailAPICallRequest: questionDetailAPICallRequest
})
export default connect(mapStateToProps, mapDispatchToProps)(QuestionDetail)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment