From 0695f4158e14a779f2156fdf1bd76f1ad8235010 Mon Sep 17 00:00:00 2001 From: XuefengWu Date: Tue, 23 Sep 2014 15:22:11 +0800 Subject: [PATCH] Update getting-started.md merge the warn and explain for the @jsx --- docs/getting-started.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 049ece11..b6574b5a 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -57,7 +57,11 @@ React.renderComponent( document.getElementById('example') ); ``` -> ```/** @jsx React.DOM */``` is must, or jsx would not convert. + +> Note: +> +> ```/** @jsx React.DOM */``` is *must*, which is jsx convention. 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`: @@ -90,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: