Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 1.79 KB

File metadata and controls

13 lines (8 loc) · 1.79 KB

Reconcilation Bug medium #react

by Pawan Kumar @jsartisan

Take the Challenge

You have a form with a checkbox and a conditionally rendered input based on the state of the checkbox.
The input should collect either your company tax ID or your personal tax ID.

When checking or unchecking the checkbox, the input should switch between the personal and company fields.
If you type something in the input and then toggle the checkbox, the value should be cleared (since a new input is being rendered).

However, in the following code, this does not happen.

What would you change to fix this behavior?


Back Share your Solutions Check out Solutions