In the tutorials
, axios.post("http://" + ip + "/api/led/change", data)
is followed by the same command.
There are three different commands that are slowly building up what to do, and I am not sure if it is necessary to have this part of the code as three commands building up the axios.post
, then repeating it and adding the then
, and then repeating both parts and adding the catch
.
Using the final command and adding all of the comments may be a better option.