|
|
@ -73,7 +73,7 @@ var app = React.createElement( |
|
|
|
); |
|
|
|
``` |
|
|
|
|
|
|
|
JSX will infer the class's [displayName](/react/docs/component-specs.html#displayName) from the variable assignment when the displayName is undefined: |
|
|
|
JSX will infer the class's [displayName](/react/docs/component-specs.html#displayname) from the variable assignment when the displayName is undefined: |
|
|
|
|
|
|
|
```javascript |
|
|
|
// Input (JSX): |
|
|
@ -92,7 +92,7 @@ If you want to use JSX, the [Getting Started](/react/docs/getting-started.html) |
|
|
|
> Note: |
|
|
|
> |
|
|
|
> The JSX expression always evaluates to a ReactElement. The actual |
|
|
|
> implementation details may vary. An optimized mode could inline the |
|
|
|
> implementation details may vary. An optimized mode could inline the |
|
|
|
> ReactElement as an object literal to bypass the validation code in |
|
|
|
> `React.createElement`. |
|
|
|
|
|
|
@ -146,9 +146,9 @@ JSX will handle this properly when compiling your code. |
|
|
|
|
|
|
|
```javascript |
|
|
|
var App = ( |
|
|
|
React.createElement(Form, null, |
|
|
|
React.createElement(Form.Row, null, |
|
|
|
React.createElement(Form.Label, null), |
|
|
|
React.createElement(Form, null, |
|
|
|
React.createElement(Form.Row, null, |
|
|
|
React.createElement(Form.Label, null), |
|
|
|
React.createElement(Form.Input, null) |
|
|
|
) |
|
|
|
) |
|
|
@ -210,5 +210,5 @@ var content = ( |
|
|
|
``` |
|
|
|
|
|
|
|
> NOTE: |
|
|
|
> |
|
|
|
> |
|
|
|
> JSX is similar to HTML, but not exactly the same. See [JSX gotchas](/react/docs/jsx-gotchas.html) for some key differences. |
|
|
|