simple components:
export default class Test extends React.Component {
constructor() {
super();
this.onChange = this.onChange.bind(this);
this.state = {};
}
onChange(key, value) {}
render() {
return (
<div className="daka-login">
</div>
);
}
}
components wrapped by Form form components:
class Test extends React.Component {
constructor() {
super();
this.onChange = this.onChange.bind(this);
this.state = {};
}
onChange(key, value) {}
render() {
return (
<div className="daka-login">
</div>
);
}
}
const WrappedUserTest = Form.create()(Test);
export default WrappedUserTest;
onChange methods for simple components can be tested in the following ways:
mount(<Test {...props} />).instance().onChange()
but the package wrapped by the Form form will report an error. How should I modify it? thank you.