Skip to content

Instantly share code, notes, and snippets.

@nirmalrepo
Last active October 11, 2017 11:01
Show Gist options
  • Save nirmalrepo/453c6cd86053957ffccf7394ce376f9d to your computer and use it in GitHub Desktop.
Save nirmalrepo/453c6cd86053957ffccf7394ce376f9d to your computer and use it in GitHub Desktop.
1. createClass
import React from 'react'
export const SkiDayCount = React.createClass({});
2. ES6 class
import {Component} from 'react'
export class SkiDayCount extends Component{}
3. Stateless functional componets
//props object destructuring via ES6
export const SkiDayCount = ({total, powder, backcountry, goal}) => ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment