@@ -13997,13 +13997,13 @@ let root = OCamlRes.Res.([
13997
13997
Dir ("react", [
13998
13998
Dir ("src", [
13999
13999
File ("Index.re",
14000
- "ReactDOMRe.renderToElementWithId(<Component1 message=\"Hello!\" />, \"index1\");\n\
14000
+ "ReactDOMRe.renderToElementWithId(<Component1 message=\"Hello! Click this text. \" />, \"index1\");\n\
14001
14001
\n\
14002
14002
ReactDOMRe.renderToElementWithId(<Component2 greeting=\"Hello!\" />, \"index2\");\n\
14003
14003
") ;
14004
14004
File ("Component1.re",
14005
14005
"/* This is the basic component. */\n\
14006
- let component = ReasonReact.statelessComponent(\"Page \");\n\
14006
+ let component = ReasonReact.statelessComponent(\"Component1 \");\n\
14007
14007
\n\
14008
14008
/* Your familiar handleClick from ReactJS. This mandatorily takes the payload,\n\
14009
14009
\ then the `self` record, which contains state (none here), `handle`, `reduce`\n\
@@ -14013,16 +14013,16 @@ let root = OCamlRes.Res.([
14013
14013
/* `make` is the function that mandatorily takes `children` (if you want to use\n\
14014
14014
\ `JSX). `message` is a named argument, which simulates ReactJS props. Usage:\n\
14015
14015
\n\
14016
- \ `<Page message=\"hello\" />`\n\
14016
+ \ `<Component1 message=\"hello\" />`\n\
14017
14017
\n\
14018
14018
\ Which desugars to\n\
14019
14019
\n\
14020
- \ `ReasonReact.element(Page .make(~message=\"hello\", [||]))` */\n\
14020
+ \ `ReasonReact.element(Component1 .make(~message=\"hello\", [||]))` */\n\
14021
14021
let make = (~message, _children) => {\n\
14022
14022
\ ...component,\n\
14023
14023
\ render: self =>\n\
14024
- \ <div onClick=( self.handle(handleClick)) >\n\
14025
- \ ( ReasonReact.string(message)) \n\
14024
+ \ <div onClick={ self.handle(handleClick)} >\n\
14025
+ \ { ReasonReact.string(message)} \n\
14026
14026
\ </div>,\n\
14027
14027
};\n\
14028
14028
") ;
@@ -14061,13 +14061,13 @@ let root = OCamlRes.Res.([
14061
14061
\ let message =\n\
14062
14062
\ \"You've clicked this \" ++ string_of_int(self.state.count) ++ \" times(s)\";\n\
14063
14063
\ <div>\n\
14064
- \ <button onClick=( _event => self.send(Click)) >\n\
14065
- \ ( ReasonReact.string(message)) \n\
14064
+ \ <button onClick={ _event => self.send(Click)} >\n\
14065
+ \ { ReasonReact.string(message)} \n\
14066
14066
\ </button>\n\
14067
- \ <button onClick=( _event => self.send(Toggle)) >\n\
14068
- \ ( ReasonReact.string(\"Toggle greeting\")) \n\
14067
+ \ <button onClick={ _event => self.send(Toggle)} >\n\
14068
+ \ { ReasonReact.string(\"Toggle greeting\")} \n\
14069
14069
\ </button>\n\
14070
- \ ( self.state.show ? ReasonReact.string(greeting) : ReasonReact.null) \n\
14070
+ \ { self.state.show ? ReasonReact.string(greeting) : ReasonReact.null} \n\
14071
14071
\ </div>;\n\
14072
14072
\ },\n\
14073
14073
};\n\
@@ -14082,6 +14082,7 @@ let root = OCamlRes.Res.([
14082
14082
<body>\n\
14083
14083
\ Component 1:\n\
14084
14084
\ <div id=\"index1\"></div>\n\
14085
+ \n\
14085
14086
\ Component 2:\n\
14086
14087
\ <div id=\"index2\"></div>\n\
14087
14088
\n\
@@ -14223,13 +14224,13 @@ let root = OCamlRes.Res.([
14223
14224
Dir ("react-lite", [
14224
14225
Dir ("src", [
14225
14226
File ("Index.re",
14226
- "ReactDOMRe.renderToElementWithId(<Component1 message=\"Hello!\" />, \"index1\");\n\
14227
+ "ReactDOMRe.renderToElementWithId(<Component1 message=\"Hello! Click this text. \" />, \"index1\");\n\
14227
14228
\n\
14228
14229
ReactDOMRe.renderToElementWithId(<Component2 greeting=\"Hello!\" />, \"index2\");\n\
14229
14230
") ;
14230
14231
File ("Component1.re",
14231
14232
"/* This is the basic component. */\n\
14232
- let component = ReasonReact.statelessComponent(\"Page \");\n\
14233
+ let component = ReasonReact.statelessComponent(\"Component1 \");\n\
14233
14234
\n\
14234
14235
/* Your familiar handleClick from ReactJS. This mandatorily takes the payload,\n\
14235
14236
\ then the `self` record, which contains state (none here), `handle`, `reduce`\n\
@@ -14239,16 +14240,16 @@ let root = OCamlRes.Res.([
14239
14240
/* `make` is the function that mandatorily takes `children` (if you want to use\n\
14240
14241
\ `JSX). `message` is a named argument, which simulates ReactJS props. Usage:\n\
14241
14242
\n\
14242
- \ `<Page message=\"hello\" />`\n\
14243
+ \ `<Component1 message=\"hello\" />`\n\
14243
14244
\n\
14244
14245
\ Which desugars to\n\
14245
14246
\n\
14246
- \ `ReasonReact.element(Page .make(~message=\"hello\", [||]))` */\n\
14247
+ \ `ReasonReact.element(Component1 .make(~message=\"hello\", [||]))` */\n\
14247
14248
let make = (~message, _children) => {\n\
14248
14249
\ ...component,\n\
14249
14250
\ render: self =>\n\
14250
14251
\ <div onClick=(self.handle(handleClick))>\n\
14251
- \ ( ReasonReact.string(message)) \n\
14252
+ \ { ReasonReact.string(message)} \n\
14252
14253
\ </div>,\n\
14253
14254
};\n\
14254
14255
") ;
@@ -14287,13 +14288,13 @@ let root = OCamlRes.Res.([
14287
14288
\ let message =\n\
14288
14289
\ \"You've clicked this \" ++ string_of_int(self.state.count) ++ \" times(s)\";\n\
14289
14290
\ <div>\n\
14290
- \ <button onClick=( _event => self.send(Click)) >\n\
14291
- \ ( ReasonReact.string(message)) \n\
14291
+ \ <button onClick={ _event => self.send(Click)} >\n\
14292
+ \ { ReasonReact.string(message)} \n\
14292
14293
\ </button>\n\
14293
- \ <button onClick=( _event => self.send(Toggle)) >\n\
14294
- \ ( ReasonReact.string(\"Toggle greeting\")) \n\
14294
+ \ <button onClick={ _event => self.send(Toggle)} >\n\
14295
+ \ { ReasonReact.string(\"Toggle greeting\")} \n\
14295
14296
\ </button>\n\
14296
- \ ( self.state.show ? ReasonReact.string(greeting) : ReasonReact.null) \n\
14297
+ \ { self.state.show ? ReasonReact.string(greeting) : ReasonReact.null} \n\
14297
14298
\ </div>;\n\
14298
14299
\ },\n\
14299
14300
};\n\
0 commit comments