From 1dfcc5190d3fb3cd79d6b427c236484a2e1c150b Mon Sep 17 00:00:00 2001 From: unexge Date: Sat, 7 Mar 2020 10:51:04 +0300 Subject: [PATCH] Mark `componentWillMount`s as unsafe --- src/control.ts | 2 +- src/form.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }