Reputation: 368
I am trying to add a bool property to a form that is toggled on/off depending on the click of button1 or button2.
When I do this codesandbox on my local setup, I get the react setState error but only on the first click.
Warning: Can't call setState on a component that is not yet mounted.
I imagine it is because invoking input.onChange is not expected. What is the best way to accomplish the custom input?
Upvotes: 0
Views: 3670
Reputation: 1710
I don't find anything wrong with the downloaded setup from above sandbox on my local.
Probably, you have updated the code after finding a fix. Please let people know the solution if your issue is resolved or close it
Upvotes: 2