enter image description here

My problem is passing ${file.id} to link, but when I navigate to that link, I only receive like this: enter image description here

the ${file.id} is not get correct value. But when I inspect the key of row, it can render correct.

enter image description here What are my mising?


2 upvote
Thats because you are not using backticks (`) , use to={`something/${key}`} – Shubham Khatri
Thank @ShubhamKhatri. It works now. – jack.pop

1 Answers 11

up vote 2 down vote accepted

You are using the wrong quotes. String interpolation is not possible with single quotes or doublequotes. You have to use the backtick `


<Link to={'api/admin/blobManager/${file.id}'} />

should instead be

<Link to={`api/admin/blobManager/${file.id}`} />

Not the answer you're looking for? Browse other questions tagged or ask your own question.