From dee98675a92ab95ad2ce65946358151a21f298aa Mon Sep 17 00:00:00 2001 From: Hannu Lyytikainen Date: Thu, 5 Jul 2018 19:26:56 +0300 Subject: [PATCH] Remove component state initialization The state initialization is performed when the component goes into submittin mode. However, after the form is submitted, the component unmounts and the state is destroyed. --- src/forms/StripePaymentForm/StripePaymentForm.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/forms/StripePaymentForm/StripePaymentForm.js b/src/forms/StripePaymentForm/StripePaymentForm.js index cae7fbe9..3d064f69 100644 --- a/src/forms/StripePaymentForm/StripePaymentForm.js +++ b/src/forms/StripePaymentForm/StripePaymentForm.js @@ -113,9 +113,6 @@ class StripePaymentForm extends Component { } }); } - componentWillReceiveProps() { - this.setState(initialState); - } componentWillUnmount() { if (this.card) { this.card.removeEventListener('change', this.handleCardValueChange);