Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const changeTodo = e => {
- e.preventDefault();
- const data = {
- user: info._id,
- _id: e.target.id
- };
- axios
- .put("http://localhost:5000/todos", {data} )
- // .then((window.location = "http://localhost:3000/todos"));
- .then(data => console.log(data))
- .catch(err => console.log(err));
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement