From e179f7b19e66b905ae5bf540e47acbb7dd38b958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Wed, 24 Sep 2014 15:35:36 -0700 Subject: [PATCH] Merge pull request #2228 from XuefengWu/patch-1 add tip for the important jsx convention --- docs/docs/getting-started.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/docs/getting-started.md b/docs/docs/getting-started.md index 36c3a59be0..01a4c30132 100644 --- a/docs/docs/getting-started.md +++ b/docs/docs/getting-started.md @@ -57,6 +57,12 @@ React.renderComponent( document.getElementById('example') ); ``` + +> Note: +> +> ```/** @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. + + Then reference it from `helloworld.html`: ```html{10} @@ -88,9 +94,6 @@ React.renderComponent( ); ``` -> Note: -> -> 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. Update your HTML file as below: