Skip to content

Commit 28296c5

Browse files
committed
snapshot bsb changes
1 parent 1e4cc35 commit 28296c5

File tree

2 files changed

+44
-42
lines changed

2 files changed

+44
-42
lines changed

jscomp/bsb/bsb_templates.ml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -476,13 +476,13 @@ let root = OCamlRes.Res.([
476476
Dir ("react", [
477477
Dir ("src", [
478478
File ("Index.re",
479-
"ReactDOMRe.renderToElementWithId(<Component1 message=\"Hello!\" />, \"index1\");\n\
479+
"ReactDOMRe.renderToElementWithId(<Component1 message=\"Hello! Click this text.\" />, \"index1\");\n\
480480
\n\
481481
ReactDOMRe.renderToElementWithId(<Component2 greeting=\"Hello!\" />, \"index2\");\n\
482482
") ;
483483
File ("Component1.re",
484484
"/* This is the basic component. */\n\
485-
let component = ReasonReact.statelessComponent(\"Page\");\n\
485+
let component = ReasonReact.statelessComponent(\"Component1\");\n\
486486
\n\
487487
/* Your familiar handleClick from ReactJS. This mandatorily takes the payload,\n\
488488
\ then the `self` record, which contains state (none here), `handle`, `reduce`\n\
@@ -492,16 +492,16 @@ let root = OCamlRes.Res.([
492492
/* `make` is the function that mandatorily takes `children` (if you want to use\n\
493493
\ `JSX). `message` is a named argument, which simulates ReactJS props. Usage:\n\
494494
\n\
495-
\ `<Page message=\"hello\" />`\n\
495+
\ `<Component1 message=\"hello\" />`\n\
496496
\n\
497497
\ Which desugars to\n\
498498
\n\
499-
\ `ReasonReact.element(Page.make(~message=\"hello\", [||]))` */\n\
499+
\ `ReasonReact.element(Component1.make(~message=\"hello\", [||]))` */\n\
500500
let make = (~message, _children) => {\n\
501501
\ ...component,\n\
502502
\ render: self =>\n\
503-
\ <div onClick=(self.handle(handleClick))>\n\
504-
\ (ReasonReact.string(message))\n\
503+
\ <div onClick={self.handle(handleClick)}>\n\
504+
\ {ReasonReact.string(message)}\n\
505505
\ </div>,\n\
506506
};\n\
507507
") ;
@@ -540,13 +540,13 @@ let root = OCamlRes.Res.([
540540
\ let message =\n\
541541
\ \"You've clicked this \" ++ string_of_int(self.state.count) ++ \" times(s)\";\n\
542542
\ <div>\n\
543-
\ <button onClick=(_event => self.send(Click))>\n\
544-
\ (ReasonReact.string(message))\n\
543+
\ <button onClick={_event => self.send(Click)}>\n\
544+
\ {ReasonReact.string(message)}\n\
545545
\ </button>\n\
546-
\ <button onClick=(_event => self.send(Toggle))>\n\
547-
\ (ReasonReact.string(\"Toggle greeting\"))\n\
546+
\ <button onClick={_event => self.send(Toggle)}>\n\
547+
\ {ReasonReact.string(\"Toggle greeting\")}\n\
548548
\ </button>\n\
549-
\ (self.state.show ? ReasonReact.string(greeting) : ReasonReact.null)\n\
549+
\ {self.state.show ? ReasonReact.string(greeting) : ReasonReact.null}\n\
550550
\ </div>;\n\
551551
\ },\n\
552552
};\n\
@@ -561,6 +561,7 @@ let root = OCamlRes.Res.([
561561
<body>\n\
562562
\ Component 1:\n\
563563
\ <div id=\"index1\"></div>\n\
564+
\n\
564565
\ Component 2:\n\
565566
\ <div id=\"index2\"></div>\n\
566567
\n\
@@ -702,13 +703,13 @@ let root = OCamlRes.Res.([
702703
Dir ("react-lite", [
703704
Dir ("src", [
704705
File ("Index.re",
705-
"ReactDOMRe.renderToElementWithId(<Component1 message=\"Hello!\" />, \"index1\");\n\
706+
"ReactDOMRe.renderToElementWithId(<Component1 message=\"Hello! Click this text.\" />, \"index1\");\n\
706707
\n\
707708
ReactDOMRe.renderToElementWithId(<Component2 greeting=\"Hello!\" />, \"index2\");\n\
708709
") ;
709710
File ("Component1.re",
710711
"/* This is the basic component. */\n\
711-
let component = ReasonReact.statelessComponent(\"Page\");\n\
712+
let component = ReasonReact.statelessComponent(\"Component1\");\n\
712713
\n\
713714
/* Your familiar handleClick from ReactJS. This mandatorily takes the payload,\n\
714715
\ then the `self` record, which contains state (none here), `handle`, `reduce`\n\
@@ -718,16 +719,16 @@ let root = OCamlRes.Res.([
718719
/* `make` is the function that mandatorily takes `children` (if you want to use\n\
719720
\ `JSX). `message` is a named argument, which simulates ReactJS props. Usage:\n\
720721
\n\
721-
\ `<Page message=\"hello\" />`\n\
722+
\ `<Component1 message=\"hello\" />`\n\
722723
\n\
723724
\ Which desugars to\n\
724725
\n\
725-
\ `ReasonReact.element(Page.make(~message=\"hello\", [||]))` */\n\
726+
\ `ReasonReact.element(Component1.make(~message=\"hello\", [||]))` */\n\
726727
let make = (~message, _children) => {\n\
727728
\ ...component,\n\
728729
\ render: self =>\n\
729730
\ <div onClick=(self.handle(handleClick))>\n\
730-
\ (ReasonReact.string(message))\n\
731+
\ {ReasonReact.string(message)}\n\
731732
\ </div>,\n\
732733
};\n\
733734
") ;
@@ -766,13 +767,13 @@ let root = OCamlRes.Res.([
766767
\ let message =\n\
767768
\ \"You've clicked this \" ++ string_of_int(self.state.count) ++ \" times(s)\";\n\
768769
\ <div>\n\
769-
\ <button onClick=(_event => self.send(Click))>\n\
770-
\ (ReasonReact.string(message))\n\
770+
\ <button onClick={_event => self.send(Click)}>\n\
771+
\ {ReasonReact.string(message)}\n\
771772
\ </button>\n\
772-
\ <button onClick=(_event => self.send(Toggle))>\n\
773-
\ (ReasonReact.string(\"Toggle greeting\"))\n\
773+
\ <button onClick={_event => self.send(Toggle)}>\n\
774+
\ {ReasonReact.string(\"Toggle greeting\")}\n\
774775
\ </button>\n\
775-
\ (self.state.show ? ReasonReact.string(greeting) : ReasonReact.null)\n\
776+
\ {self.state.show ? ReasonReact.string(greeting) : ReasonReact.null}\n\
776777
\ </div>;\n\
777778
\ },\n\
778779
};\n\

lib/bsb.ml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13997,13 +13997,13 @@ let root = OCamlRes.Res.([
1399713997
Dir ("react", [
1399813998
Dir ("src", [
1399913999
File ("Index.re",
14000-
"ReactDOMRe.renderToElementWithId(<Component1 message=\"Hello!\" />, \"index1\");\n\
14000+
"ReactDOMRe.renderToElementWithId(<Component1 message=\"Hello! Click this text.\" />, \"index1\");\n\
1400114001
\n\
1400214002
ReactDOMRe.renderToElementWithId(<Component2 greeting=\"Hello!\" />, \"index2\");\n\
1400314003
") ;
1400414004
File ("Component1.re",
1400514005
"/* This is the basic component. */\n\
14006-
let component = ReasonReact.statelessComponent(\"Page\");\n\
14006+
let component = ReasonReact.statelessComponent(\"Component1\");\n\
1400714007
\n\
1400814008
/* Your familiar handleClick from ReactJS. This mandatorily takes the payload,\n\
1400914009
\ then the `self` record, which contains state (none here), `handle`, `reduce`\n\
@@ -14013,16 +14013,16 @@ let root = OCamlRes.Res.([
1401314013
/* `make` is the function that mandatorily takes `children` (if you want to use\n\
1401414014
\ `JSX). `message` is a named argument, which simulates ReactJS props. Usage:\n\
1401514015
\n\
14016-
\ `<Page message=\"hello\" />`\n\
14016+
\ `<Component1 message=\"hello\" />`\n\
1401714017
\n\
1401814018
\ Which desugars to\n\
1401914019
\n\
14020-
\ `ReasonReact.element(Page.make(~message=\"hello\", [||]))` */\n\
14020+
\ `ReasonReact.element(Component1.make(~message=\"hello\", [||]))` */\n\
1402114021
let make = (~message, _children) => {\n\
1402214022
\ ...component,\n\
1402314023
\ 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\
1402614026
\ </div>,\n\
1402714027
};\n\
1402814028
") ;
@@ -14061,13 +14061,13 @@ let root = OCamlRes.Res.([
1406114061
\ let message =\n\
1406214062
\ \"You've clicked this \" ++ string_of_int(self.state.count) ++ \" times(s)\";\n\
1406314063
\ <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\
1406614066
\ </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\
1406914069
\ </button>\n\
14070-
\ (self.state.show ? ReasonReact.string(greeting) : ReasonReact.null)\n\
14070+
\ {self.state.show ? ReasonReact.string(greeting) : ReasonReact.null}\n\
1407114071
\ </div>;\n\
1407214072
\ },\n\
1407314073
};\n\
@@ -14082,6 +14082,7 @@ let root = OCamlRes.Res.([
1408214082
<body>\n\
1408314083
\ Component 1:\n\
1408414084
\ <div id=\"index1\"></div>\n\
14085+
\n\
1408514086
\ Component 2:\n\
1408614087
\ <div id=\"index2\"></div>\n\
1408714088
\n\
@@ -14223,13 +14224,13 @@ let root = OCamlRes.Res.([
1422314224
Dir ("react-lite", [
1422414225
Dir ("src", [
1422514226
File ("Index.re",
14226-
"ReactDOMRe.renderToElementWithId(<Component1 message=\"Hello!\" />, \"index1\");\n\
14227+
"ReactDOMRe.renderToElementWithId(<Component1 message=\"Hello! Click this text.\" />, \"index1\");\n\
1422714228
\n\
1422814229
ReactDOMRe.renderToElementWithId(<Component2 greeting=\"Hello!\" />, \"index2\");\n\
1422914230
") ;
1423014231
File ("Component1.re",
1423114232
"/* This is the basic component. */\n\
14232-
let component = ReasonReact.statelessComponent(\"Page\");\n\
14233+
let component = ReasonReact.statelessComponent(\"Component1\");\n\
1423314234
\n\
1423414235
/* Your familiar handleClick from ReactJS. This mandatorily takes the payload,\n\
1423514236
\ then the `self` record, which contains state (none here), `handle`, `reduce`\n\
@@ -14239,16 +14240,16 @@ let root = OCamlRes.Res.([
1423914240
/* `make` is the function that mandatorily takes `children` (if you want to use\n\
1424014241
\ `JSX). `message` is a named argument, which simulates ReactJS props. Usage:\n\
1424114242
\n\
14242-
\ `<Page message=\"hello\" />`\n\
14243+
\ `<Component1 message=\"hello\" />`\n\
1424314244
\n\
1424414245
\ Which desugars to\n\
1424514246
\n\
14246-
\ `ReasonReact.element(Page.make(~message=\"hello\", [||]))` */\n\
14247+
\ `ReasonReact.element(Component1.make(~message=\"hello\", [||]))` */\n\
1424714248
let make = (~message, _children) => {\n\
1424814249
\ ...component,\n\
1424914250
\ render: self =>\n\
1425014251
\ <div onClick=(self.handle(handleClick))>\n\
14251-
\ (ReasonReact.string(message))\n\
14252+
\ {ReasonReact.string(message)}\n\
1425214253
\ </div>,\n\
1425314254
};\n\
1425414255
") ;
@@ -14287,13 +14288,13 @@ let root = OCamlRes.Res.([
1428714288
\ let message =\n\
1428814289
\ \"You've clicked this \" ++ string_of_int(self.state.count) ++ \" times(s)\";\n\
1428914290
\ <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\
1429214293
\ </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\
1429514296
\ </button>\n\
14296-
\ (self.state.show ? ReasonReact.string(greeting) : ReasonReact.null)\n\
14297+
\ {self.state.show ? ReasonReact.string(greeting) : ReasonReact.null}\n\
1429714298
\ </div>;\n\
1429814299
\ },\n\
1429914300
};\n\

0 commit comments

Comments
 (0)