You can use the
React.createClass() function to declare a component and have its method contexts auto bind to the component.
This did not work. Gave an error. From StackOverflow: This is surely a version problem, If you are starting fresh, I would suggest you to create a React component by extending React.Component rather than using React.createClass since its deprecated from version 16.0 onwards and has been moved to a separate package 'create-react-class' as @Dream_Cap also mention
Share this highlighthttp://www.safaribooksonline.com/a/react-and-react/11168889/