This video continues implementing our task list application with Scala.js. Most of the work is on how to get a fetch from JavaScript to Scala.js.
Update: Since this video was made, the interface for the Scala.js fetch has been modified slightly. RequestInit no longer takes arguments. Instead, it needs a body that sets values as in the following code.
new RequestInit {
method = HttpMethod.POST
headers = hs
body = Json.toJson(data).toString
}
Note that you need to change the variable name for the Headers to something other than headers. I used hs in this code.