diff --git a/src/control.ts b/src/control.ts index 7202223..5f53e87 100644 --- a/src/control.ts +++ b/src/control.ts @@ -82,7 +82,7 @@ class Control extends Component { get isTouched() { return this.state.touched; } get isUntouched() { return !this.isTouched; } - componentWillMount() { + UNSAFE_componentWillMount() { this.context.form.addControl(this.props.name, this); } diff --git a/src/form.ts b/src/form.ts index 8750539..3513085 100644 --- a/src/form.ts +++ b/src/form.ts @@ -53,7 +53,7 @@ class Form extends Component { this.update = this.update.bind(this); } - componentWillMount() { + UNSAFE_componentWillMount() { this.mounted = true; }