Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

144
Views
no se puede importar valor dinámico dentro de llaves - Zero to Mastery React

es mi primera pregunta sobre StackOverflow; bastante básico

Estoy estudiando el curso de reacción "Zero to Mastery", y no puedo entender por qué no puedo usar ${} o {} dentro de la fuente de la imagen, me refiero a props.monster.id

 import "./card.styles.css"; export const Card = (props) => ( <div className="card-container"> <img src={"https://robohash.org/${props.monster.id}?set=set2"} /> <h1> {props.monster.name} </h1> </div> );

y este es su hermano (Perdón por mi forma de pregunta)

 import { Card } from "../card/card.component"; import "./card-list.styles.css"; export const CardList = (props) => { return ( <div className="card-list"> {props.monsters.map((monster) => ( <Card key={monster.id} monster={monster} /> ))} </div> ); };
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

<img src={`https://robohash.org/${props.monster.id}?set=set2`} />

reemplace el "" con acentos graves como lo hice en el ejemplo

about 4 years ago · Juan Pablo Isaza Report

0

Debe usar acentos graves en lugar de comillas para concatenar cadenas y variables:

 export const Card = (props) => ( <div className="card-container"> <img src={`https://robohash.org/${props.monster.id}?set=set2`} /> <h1>{props.monster.name}</h1> </div> );
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!