Component.js version of https://github.com/facebook/react