This is my component(react) which include rematch(Re play or play again) button.
render() {
const rematchTitle = formattedMessage('App.rematch');
retu (
<div className='modal-footer'>
<a className='btn'>{rematchTitle}</a>
</div>
);
}
I want to give click event to that button.And when user click that (rematch-play again)button I want to trigger ready state(I want to change state to ready when user click that button).Because previous developer developed ready state and it works very well(ready state has reducers,actions...).I could not access previous developer and I am new at the redux.
I try to give onclick event to that button but this.props is not work.Where can I bind or set this.props?Should I add a new action as name reMatch and reducer as name reMatch?Where should I set this.props?In action?Or reducer?Or components?
const { onPlayAgain } = this.props;
let PlayAgain = '';
const rematchlabel = <FormattedMessage message="app.rematch"/>;
PlayAgainButton = (
<a onClick={onPlayAgain } className={buttonStyleClassColored(colorBlue)}> {rematchlabel}</a>
);
