Skip to content

Commit 9c19706

Browse files
committed
- Merged 2 separate Coffeescript sections in README to one section
1 parent 3b6d6bd commit 9c19706

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

README.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,6 @@ config.react.jsx_transform_options = {
114114
}
115115
```
116116

117-
#### CoffeeScript
118-
119-
To use CoffeeScript, create `.js.jsx.coffee` files and embed JSX inside backticks, for example:
120-
121-
```coffee
122-
Component = React.createClass
123-
render: ->
124-
`<ExampleComponent videos={this.props.videos} />`
125-
```
126-
127117
### Rendering & mounting
128118

129119
`react-rails` includes a view helper (`react_component`) and an unobtrusive JavaScript driver (`react_ujs`)
@@ -289,8 +279,9 @@ end
289279

290280
## CoffeeScript
291281

292-
It is possible to use JSX with CoffeeScript. We need to embed JSX inside backticks
293-
so CoffeeScript ignores the syntax it doesn't understand. Here's an example:
282+
It is possible to use JSX with CoffeeScript. To use CoffeeScript, create files with an extension `.js.jsx.coffee`.
283+
We also need to embed JSX code inside backticks so that CoffeeScript ignores the syntax it doesn't understand.
284+
Here's an example:
294285

295286
```coffee
296287
Component = React.createClass

0 commit comments

Comments
 (0)