KyleAMathews / coffee-react-quickstart

Quickstart for building React single page apps using Coffeescript, Gulp, Webpack, and React-Router
http://kyleamathews.github.io/coffee-react-quickstart
MIT License
254 stars 41 forks source link

Plain coffeescript style? #23

Open wmertens opened 9 years ago

wmertens commented 9 years ago

Should this project also provide examples of how to write without a jsx transform?

e.g.

React = require 'react'
E = React.createElement
N = null
Link = require('react-router').Link
RouteHandler = require('react-router').RouteHandler

# Provides global navigation for app e.g. the "Hello | Styleguide" at the top.
module.exports = React.createClass
  displayName: 'HelloWorld'
  render: ->
    E 'div', N,
      E 'header', N,
         E 'Link', to: "hello", 'Hello'
         '|'
         E 'Link', to: "styleguide", 'Styleguide'
         "| whee" if showWhee
         "#{i} " for i in [1..10]
         E 'RouteHandler'
KyleAMathews commented 9 years ago

It certainly could! I'm not the one to write it though as I exclusively use cjsx.

I'd be happy to accept a PR however — either you could add a document here or perhaps even better, you write a blog post and we add a link to the README here.