The library for web and native user interfaces.
Update syntax.md
Some inconsistencies pointed out in FB comments
Pete Hunt committed
Jul 2, 2013 at 18:27 UTC
b6451be5823d199487f390997b0adc0f038dc79f
1 file changed
+4
-4
docs/docs/syntax.md
+4
-4
@@ -37,7 +37,7 @@ var Nav;
37
// Input (JSX):
38
var app = <Nav color="blue" />;
39
// Output (JS):
40
-var app = Nav({color:'blue'});
40
+var app = Nav({color:'blue'}, null);
41
```
42
43
Notice that in order to use `<Nav />`, the `Nav` variable must be in scope.
@@ -49,7 +49,7 @@ var Nav, Profile;
49
// Input (JSX):
50
var app = <Nav color="blue"><Profile>click</Profile></Nav>;
51
// Output (JS):
52
-var app = Nav({color:'blue'}, Profile({}, 'click'));
52
+var app = Nav({color:'blue'}, Profile(null, 'click'));
53
```
54
55
Use the [JSX Compiler](/react/jsx-compiler.html) to try out JSX and see how it
@@ -114,7 +114,7 @@ var Nav;
114
// Input (JSX):
115
var tree = <Nav><span /></Nav>;
116
// Output (JS):
117
-var tree = Nav({}, React.DOM.span({}));
117
+var tree = Nav(null, React.DOM.span(null, null));
118
```
119
120
> Remember:
@@ -145,7 +145,7 @@ Likewise, JavaScript expressions may be used to express children:
145
// Input (JSX):
146
var content = <Container>{window.isLoggedIn ? <Nav /> : <Login />}</Container>;
147
// Output (JS):
148
-var content = Container({}, window.isLoggedIn ? <Nav /> : <Login />);
148
+var content = Container(null, window.isLoggedIn ? Nav(null, null) : Login(null, null));
149
```
150
151
## Tooling