Last active
February 22, 2017 08:05
-
-
Save algesten/6b62204c31f1e2ffbb4820d44b484bfe to your computer and use it in GitHub Desktop.
This file contains 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
# Stateful | |
class MyComponent extends React.Component | |
constructor: (props) -> | |
super | |
render: => | |
div class:'mycomponent', -> | |
span 'Hej' | |
# Stateless | |
MyComponent = (props) -> | |
div class:'mycomponent', -> | |
span 'Hej' | |
# Oavsett så funkar det här | |
createElement(MyComponent, {panda:42}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment