Skip to content

Commit 2a2d325

Browse files
committed
Change React template to fix typo.
1 parent a1ce301 commit 2a2d325

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

jscomp/bsb/templates/react-lite/src/Component1.re

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is the basic component. */
2-
let component = ReasonReact.statelessComponent("Page");
2+
let component = ReasonReact.statelessComponent("Component1");
33

44
/* Your familiar handleClick from ReactJS. This mandatorily takes the payload,
55
then the `self` record, which contains state (none here), `handle`, `reduce`
@@ -9,11 +9,11 @@ let handleClick = (_event, _self) => Js.log("clicked!");
99
/* `make` is the function that mandatorily takes `children` (if you want to use
1010
`JSX). `message` is a named argument, which simulates ReactJS props. Usage:
1111
12-
`<Page message="hello" />`
12+
`<Component1 message="hello" />`
1313
1414
Which desugars to
1515
16-
`ReasonReact.element(Page.make(~message="hello", [||]))` */
16+
`ReasonReact.element(Component1.make(~message="hello", [||]))` */
1717
let make = (~message, _children) => {
1818
...component,
1919
render: self =>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
ReactDOMRe.renderToElementWithId(<Component1 message="Hello!" />, "index1");
1+
ReactDOMRe.renderToElementWithId(<Component1 message="Hello! Click this text." />, "index1");
22

33
ReactDOMRe.renderToElementWithId(<Component2 greeting="Hello!" />, "index2");

jscomp/bsb/templates/react/src/Component1.re

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is the basic component. */
2-
let component = ReasonReact.statelessComponent("Page");
2+
let component = ReasonReact.statelessComponent("Component1");
33

44
/* Your familiar handleClick from ReactJS. This mandatorily takes the payload,
55
then the `self` record, which contains state (none here), `handle`, `reduce`
@@ -9,11 +9,11 @@ let handleClick = (_event, _self) => Js.log("clicked!");
99
/* `make` is the function that mandatorily takes `children` (if you want to use
1010
`JSX). `message` is a named argument, which simulates ReactJS props. Usage:
1111
12-
`<Page message="hello" />`
12+
`<Component1 message="hello" />`
1313
1414
Which desugars to
1515
16-
`ReasonReact.element(Page.make(~message="hello", [||]))` */
16+
`ReasonReact.element(Component1.make(~message="hello", [||]))` */
1717
let make = (~message, _children) => {
1818
...component,
1919
render: self =>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
ReactDOMRe.renderToElementWithId(<Component1 message="Hello!" />, "index1");
1+
ReactDOMRe.renderToElementWithId(<Component1 message="Hello! Click this text." />, "index1");
22

33
ReactDOMRe.renderToElementWithId(<Component2 greeting="Hello!" />, "index2");

jscomp/bsb/templates/react/src/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<body>
88
Component 1:
99
<div id="index1"></div>
10+
1011
Component 2:
1112
<div id="index2"></div>
1213

0 commit comments

Comments
 (0)