I want to show more input when "married" option is selected. I tried this.
const [single, setsingle] = useState(false);
const [married, setmarried] = useState(false);
<select class="form-select" aria-label="Default select example">
<option
value={single}
name="single"
onChange={(e) => {
setsingle(e.target.value);
}}
>
محرد
</option>
<option value={married} name="married"
onChange={(e) => {
setmarried(e.target.value)}}
>
متاهل
</option>
</select>
{married === "married" ? <Wife /> : null}
What did I miss?