Closed marlon07021 closed 2 months ago
CCInput.js
componentDidUpdate(prevProps) {
const { status, value, onBecomeEmpty, onBecomeValid, field } = this.props;
if (prevProps.value !== "" && value === "") onBecomeEmpty(field);
if (prevProps.status !== "valid" && status === "valid") onBecomeValid(field);
}
CreditCardInput.js
componentDidUpdate(prevProps) {
if (prevProps.focused !== this.props.focused) {
this._focus(this.props.focused);
}
}
Using
CreditCardInput
imported as followis giving me this:
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
npx react-codemod rename-unsafe-lifecycles
in your project source folder.Please update the following components: CCInput, CreditCardInput