following http://facebook.github.io/react/docs/tutorial.html