Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
 
PREVIOUS NEXT
Tagged: #Concatenating #variables #strings #React
ADD COMMENT
Topic
Name
5+5 =