Skip to content

Commit 7863d01

Browse files
committed
Update readme to document coffeescript usage
1 parent f711a6a commit 7863d01

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,15 @@ end
6666
```
6767

6868

69+
## CoffeeScript
70+
71+
It is possible to use JSX with CoffeeScript. The caveat is that you will still need to include the docblock. Since CoffeeScript doesn't allow `/* */` style comments, we need to do something a little different. We also need to embed JSX inside backticks so CoffeeScript ignores the syntax it doesn't understand. Here's an example:
72+
73+
```coffee
74+
###* @jsx React.DOM ###
75+
76+
Component = React.createClass
77+
render: ->
78+
`<ExampleComponent videos={this.props.videos} />`
79+
```
80+

0 commit comments

Comments
 (0)