Created
August 15, 2017 07:01
-
-
Save DC3/168858b1875e56d22a96700ce7330da1 to your computer and use it in GitHub Desktop.
React with CoffeeScrpt playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| React = @React or require 'react' | |
| win = window | |
| doc = win.document | |
| class ExampleComponent extends React.Component | |
| mixins: [React.DOM] | |
| getInitialState: -> | |
| name: 'DC3' | |
| render: -> | |
| @div null, "hello world form react! #{@state.name}" | |
| win.Example = Example | |
| win.ExampleComponent = ExampleComponent | |
| Example = ExampleComponent.build() | |
| win.onload = -> win.app = React.render Example(), doc.getElementById('main') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| doctype html | |
| html(lang="zh-cn") | |
| head | |
| title React with CoffeeScrpt playground | |
| body | |
| div#main hello world! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment