I am using react-form-validator-core in one of my projects, and I have noticed that I am getting a warning while performing certain actions. I have stripped down the code to the minimum where I can consistently reproduce this issue. You can find the code at https://github.com/ahdeshmukh/react-form-validator-core-warning.git
This is observed in Chrome and Edge. Did not test on any other browsers.
Initially, you should see a form with a single textbox. Fill some value and submit the form. This action hides the form and shows a div with the text that was entered in the textbox and a button that clears the redux state.
You will notice that there is a warning in the dev tool console ( screenshot attached )
This warning appears only on page load. You can see the textbox again by clicking on the Clear State button. No warning is thrown if you submit the form again without refreshing the page.
Files to look for
src/components/User.js ( This file has a lot of useful comments which will be helpful in making changes and testing )
Warning Text
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
I am using react-form-validator-core in one of my projects, and I have noticed that I am getting a warning while performing certain actions. I have stripped down the code to the minimum where I can consistently reproduce this issue. You can find the code at https://github.com/ahdeshmukh/react-form-validator-core-warning.git
This is observed in Chrome and Edge. Did not test on any other browsers.
Steps to reproduce
This warning appears only on page load. You can see the textbox again by clicking on the Clear State button. No warning is thrown if you submit the form again without refreshing the page.
Files to look for
Warning Text
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.