Best way to set placeholder for Select Tag in react

Let’s say, we need to render a list of courses as options of the Select Tag.

Initially set value of “course_id” to “-1” in state.


Now, you will get a nice "Choose a course" placeholder.

0 comments:

Post a Comment