0

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

  • I guess it could be wrong type of string deceleration your using a back-tick to call the variable try example: ` `${id}` ` instead of ` '${id}' ` – Shad0w Mar 31 '23 at 06:22

1 Answers1

0

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

Badal Saibo
  • 2,499
  • 11
  • 23