Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e179f7b

Browse files
committed
Merge pull request facebook#2228 from XuefengWu/patch-1
add tip for the important jsx convention
1 parent 4ba83e1 commit e179f7b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/docs/getting-started.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ React.renderComponent(
5757
document.getElementById('example')
5858
);
5959
```
60+
61+
> Note:
62+
>
63+
> ```/** @jsx React.DOM */``` is *required*. The comment parser is very strict right now; in order for it to pick up the `@jsx` modifier, two conditions are required. The `@jsx` comment block must be the first comment on the file. The comment must start with `/**` (`/*` and `//` will not work). If the parser can't find the `@jsx` comment, it will output the file without transforming it.
64+
65+
6066
Then reference it from `helloworld.html`:
6167

6268
```html{10}
@@ -88,9 +94,6 @@ React.renderComponent(
8894
);
8995
```
9096

91-
> Note:
92-
>
93-
> The comment parser is very strict right now; in order for it to pick up the `@jsx` modifier, two conditions are required. The `@jsx` comment block must be the first comment on the file. The comment must start with `/**` (`/*` and `//` will not work). If the parser can't find the `@jsx` comment, it will output the file without transforming it.
9497

9598
Update your HTML file as below:
9699

0 commit comments

Comments
 (0)