form.select react bootstrap 1

form.select react bootstrap


        Select Norm Type
         {
            console.log("e.target.value", e.target.value);
            setType(e.target.value);
          }}
        >
          
          
          
        
      

Here is what the above code is Doing:
1. We’re creating a form with a select element.
2. We’re setting the value of the select element to the value of the type variable.
3. We’re setting the onChange handler of the select element to a function that sets the value of the type variable to the value of the select element.

So, when the user changes the value of the select element, the value of the type variable is changed.

And, when the value of the type variable is changed, the value of the select element is changed.

This is a two-way binding.

Similar Posts