Skip to content

Instantly share code, notes, and snippets.

@algesten
Last active February 22, 2017 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save algesten/6b62204c31f1e2ffbb4820d44b484bfe to your computer and use it in GitHub Desktop.
Save algesten/6b62204c31f1e2ffbb4820d44b484bfe to your computer and use it in GitHub Desktop.
# 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