TheOnlyTails
12/16/2020, 5:49 PMKotlinConf Explorer
Page. I made sure my code is right (I checked the repo), yet nothing appears in my browser.Marc Knaup
12/16/2020, 6:08 PMTheOnlyTails
12/16/2020, 6:11 PMUncaught Error: Minified React error #200; visit <https://reactjs.org/docs/error-decoder.html?invariant=200> for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Marc Knaup
12/16/2020, 6:13 PMindex.html
and your Kotlin code.
There should be a <div>
with id="root"
in your index.html
.
And document.getElementById("root")
in your Kotlin code references that div
.Marc Knaup
12/16/2020, 6:14 PMdiv
.TheOnlyTails
12/16/2020, 6:23 PMfun main() {
render(document.getElementById("root")) {
h1 { +"KotlinConf Explorer" }
div {
h3 { +"Videos to watch" }
p { +"John Doe: Building and breaking things" }
p { +"Jane Smith: The development process" }
p { +"Matt Miller: The Web 7.0" }
h3 { +"Videos watched" }
p { +"Tom Jerry: Mouseless development" }
}
div {
h3 { +"John Doe: Building and breaking things" }
img {
attrs { src = "<https://via.placeholder.com/640x360.png?text=Video+Player+Placeholder>" }
}
}
}
}
TheOnlyTails
12/16/2020, 6:23 PM<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Learning Kotlin/JS</title>
</head>
<body>
<script src="KotlinJS.js"></script>
<div id="root"></div>
</body>
</html>
Marc Knaup
12/16/2020, 6:24 PM<script src="KotlinJS.js"></script>
below <div id="root"></div>
, as shown in the tutorial.TheOnlyTails
12/16/2020, 6:24 PMTheOnlyTails
12/16/2020, 6:24 PMTheOnlyTails
12/16/2020, 6:24 PM