Answer the question
In order to leave comments, you need to log in
Why is the background style substituted with a curved path with a variable in React?
Hello everyone
Such a problem that I substitute the path in the background and it is some kind of curve substituted
{
this.props.messages.map(function(element,i){
console.log(element.image) // \images\upload\den\Animals__038809_.jpg
return (
<li key={i} className="chat-message">
<div className="chat-avatar" style={{background: `url(${element.image})`}}> // background: url("imagesuploadÞn\a nimals__038809_.jpg");
</div>
<div className="chat-message-content">
<div className="chat-message-name">
{element.name}
</div>
<div className="chat-message-text">
{element.text}
</div>
</div>
</li>
)
})}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question