Answers for "how to concatenate js variaable in string in react"

1

Concatenating variables and strings in React

href={"#demo" + this.state.id}

//You can also use ES6 string interpolation/template literals with 
//` (backticks) and ${expr} (interpolated expression),

href={`#demo${this.state.id}`}

source
https://stackoverflow.com/questions/39523040/concatenating-variables-and-strings-in-react
Posted by: Guest on June-18-2021

Code answers related to "how to concatenate js variaable in string in react"

Code answers related to "Javascript"

Browse Popular Code Answers by Language