-1

I tried to Use "$" Dollar Sign in React JS Class Name

`
p class Name={'"chat-message" ${true && "enter code herechat-reciever"}'}>
`

When I used above code I doesn't work correctly. Here I'm Using Class Name in WhatsApp Clone. I want to use JavaScript for Whether This Message was sent by me or Received. Also I'm want to make second Class as True

Ajay Raja
  • 336
  • 3
  • 11

1 Answers1

0

Template literals need to delimited with backticks

p class Name={`"chat-message" ${true && "enter code here`chat-reciever"}`} 
Ryan Le
  • 7,708
  • 1
  • 13
  • 23