Created
November 9, 2018 02:38
-
-
Save SyNeto/1a8e597aa959656eb5f9ad8599b97e06 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 { 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