how can i fixed the error of the assigned id that has never been used but actually used?

21 Views Asked by At

enter image description here

screenshot of my code. the error there is the id is not used even I already used it.

I watch a video and copy it but in the part of my axios, the todoUrl and id has a problem. the video link is this. https://www.youtube.com/watch?v=AQQXlavDDc8

1

There are 1 best solutions below

0
Badal Saibo On

It's not a string but a template literal

await Axios.put(`${todoUrl}/${id}`, this.todoItem);
...
await Axios.delete(`${todoUrl}/${id}`, this.todoItem);

Wrap your code with backtick symbol ` instead of ' single quote