Skip to content
This repository was archived by the owner on May 17, 2023. It is now read-only.

Commit c9f116c

Browse files
Fix minor typos in "Building Web Applications with React and Kotlin/JS"
1 parent 398fa83 commit c9f116c

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Building Web Applications with React and Kotlin JS/03_A_First_Static_Page.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Let's start our story with a classic little *Hello World*-type program!
44

5-
Change the code inside `src/main/kotlin/Main.kt` to look like this:
5+
Replace the code inside `src/main/kotlin/Main.kt` with the following:
66

77
```kotlin
88
import kotlinx.browser.document
@@ -161,7 +161,7 @@ val watchedVideos = listOf(
161161
To use these videos in our page, we can now write a Kotlin `for`-loop to iterate over the collection of unwatched videos. Replace the three `p` tags under "Videos to watch" with the following snippet:
162162

163163
```kotlin
164-
for(video in unwatchedVideos) {
164+
for (video in unwatchedVideos) {
165165
p {
166166
+"${video.speaker}: ${video.title}"
167167
}
@@ -171,7 +171,7 @@ for(video in unwatchedVideos) {
171171
We apply the same process to modify the code for the single tag following "Videos watched", as well:
172172

173173
```kotlin
174-
for(video in watchedVideos) {
174+
for (video in watchedVideos) {
175175
p {
176176
+"${video.speaker}: ${video.title}"
177177
}

Building Web Applications with React and Kotlin JS/04_Making_It_React.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import react.dom.html.ReactHTML.div
3636
import react.dom.html.ReactHTML.p
3737
import react.dom.html.ReactHTML.img
3838

39-
val app = FC<Props> {
39+
val App = FC<Props> {
4040
// typesafe HTML goes here, starting with the first h1 tag!
4141
}
4242
```

Building Web Applications with React and Kotlin JS/05_Working_Together_Composing_Components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Here, we pass the `selectedVideo`, and a handler for `onSelectVideo` for each of
9595

9696
```kotlin
9797
VideoList {
98-
videos = unwatchedVideos
98+
videos = unwatchedVideos // and watched videos respectively!
9999
selectedVideo = currentVideo
100100
onSelectVideo = { video ->
101101
currentVideo = video

Building Web Applications with React and Kotlin JS/07_Using_Packages_From_NPM.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This is the responsible snippet:
2323
dependencies {
2424
//...
2525
//Video Player (chapter 7)
26-
implementation(npm("react-youtube-lite", "1.1.0"))
26+
implementation(npm("react-youtube-lite", "1.5.0"))
2727
//...
2828
}
2929
```
@@ -139,16 +139,16 @@ import react.ComponentClass
139139
import react.Props
140140

141141
@JsName("EmailIcon")
142-
external val emailIcon: ComponentClass<IconProps>
142+
external val EmailIcon: ComponentClass<IconProps>
143143

144144
@JsName("EmailShareButton")
145-
external val emailShareButton: ComponentClass<ShareButtonProps>
145+
external val EmailShareButton: ComponentClass<ShareButtonProps>
146146

147147
@JsName("TelegramIcon")
148-
external val telegramIcon: ComponentClass<IconProps>
148+
external val TelegramIcon: ComponentClass<IconProps>
149149

150150
@JsName("TelegramShareButton")
151-
external val telegramShareButton: ComponentClass<ShareButtonProps>
151+
external val TelegramShareButton: ComponentClass<ShareButtonProps>
152152

153153
external interface ShareButtonProps : Props {
154154
var url: String

0 commit comments

Comments
 (0)