Skip to content

Commit a34c95d

Browse files
committed
formatting ah
1 parent c921e2a commit a34c95d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

gh-pages/src/main/scala/ghpages/examples/ExternalVarExample.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ object ExternalVarExample {
1717
|val Main = ReactComponentB[Unit]("ExternalVar example")
1818
| .initialState(Name("John", "Wick"))
1919
| .render { $ =>
20-
| val name = $.state
20+
| val name = $.state
2121
| val firstNameEV = ExternalVar.state($.focusStateL(Name.firstName))
2222
| val surnameEV = ExternalVar.state($.focusStateL(Name.surname))
2323
| <.div(
@@ -29,11 +29,11 @@ object ExternalVarExample {
2929
|
3030
|val NameChanger = ReactComponentB[ExternalVar[String]]("Name changer")
3131
| .render { evar =>
32-
| def onChange = (event: ReactEventI) => evar.set(event.target.value)
32+
| def updateName = (event: ReactEventI) => evar.set(event.target.value)
3333
| <.input(
3434
| ^.`type` := "text",
3535
| ^.value := evar.value,
36-
| ^.onChange ~~> onChange)
36+
| ^.onChange ~~> updateName)
3737
| }
3838
| .build""".stripMargin
3939

@@ -44,7 +44,7 @@ object ExternalVarExample {
4444
val Main = ReactComponentB[Unit]("ExternalVar example")
4545
.initialState(Name("John", "Wick"))
4646
.render { $ =>
47-
val name = $.state
47+
val name = $.state
4848
val firstNameEV = ExternalVar.state($.focusStateL(Name.firstName))
4949
val surnameEV = ExternalVar.state($.focusStateL(Name.surname))
5050
<.div(
@@ -56,11 +56,11 @@ object ExternalVarExample {
5656

5757
val NameChanger = ReactComponentB[ExternalVar[String]]("Name changer")
5858
.render { evar =>
59-
def onChange = (event: ReactEventI) => evar.set(event.target.value)
59+
def updateName = (event: ReactEventI) => evar.set(event.target.value)
6060
<.input(
6161
^.`type` := "text",
6262
^.value := evar.value,
63-
^.onChange ~~> onChange)
63+
^.onChange ~~> updateName)
6464
}
6565
.build
6666
}

0 commit comments

Comments
 (0)