Home > OS >  How to use prop in html class
How to use prop in html class

Time:11-24

<textarea {item.title}"" id="exampleFormControlTextarea1" rows="3"> in this example i want to add item.title prop with quiz class

I want to add prop with quiz class so how should I concatenate this scenario

CodePudding user response:

<textarea className={form-control quiz${item.title}} id="exampleFormControlTextarea1" rows="3">

CodePudding user response:

You can do it this way

<textarea className={`form-control quiz${item.title}`} id="exampleFormControlTextarea1" rows="3">
  • Related