Skip to content

Commit 1f1c937

Browse files
committed
Update example file
1 parent 441e919 commit 1f1c937

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

examples/basic/src/bar.res

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,19 @@ type what = A(string) | B(int)
4040

4141
let u = {name: "test"}
4242

43+
let labelTest = (~test: string) => {
44+
"Hello " ++ test
45+
}
46+
4347
module Test = {
4448
@react.component
45-
let make = () => {
49+
let make = (~name) => {
4650
let inputRef = React.useRef(Js.Nullable.null)
4751

4852
<div>
49-
<input ref={ReactDOM.Ref.domRef(inputRef)} /> <button> {React.string("Click me")} </button>
53+
<input ref={ReactDOM.Ref.domRef(inputRef)} /> <button> {React.string("Click me " ++ name)} </button>
5054
</div>
5155
}
5256
}
57+
58+
let callbackU = (. a) => Js.log(a)

0 commit comments

Comments
 (0)