Browse Source

Remove old whitespace doc warning

This was fixed by #480.
main
Ben Alpert 11 years ago
parent
commit
65a2b204cc
  1. 11
      docs/02.2-jsx-gotchas.md

11
docs/02.2-jsx-gotchas.md

@ -13,17 +13,6 @@ JSX looks like HTML but there are some important differences you may run into.
>
> For DOM differences, such as the inline `style` attribute, check [here](/react/docs/dom-differences.html).
## Whitespace Removal
JSX doesn't follow the same whitespace elimination rules as HTML. JSX removes all whitespace between two curly braces expressions. If you want to have whitespace, simply add `{' '}`.
```javascript
<div>{this.props.name} {' '} {this.props.surname}</div>
```
Follow [Issue #65](https://github.com/facebook/react/issues/65) for discussion on this behavior.
## HTML Entities
You can insert HTML entities within literal text in JSX:

Loading…
Cancel
Save