import React from 'react'; import { withFormsy } from 'formsy-react'; class MyRadioGroup extends React.Component { state = {}; componentDidMount() { const value = this.props.value; this.props.setValue(value); this.setState({ value }); } changeValue = (value) => { this.props.setValue(value); this.setState({ value }); } render() { const className = 'form-group' + (this.props.className || ' ') + (this.props.showRequired() ? 'required' : this.props.showError() ? 'error' : ''); const errorMessage = this.props.getErrorMessage(); const { name, title, items } = this.props; return (