Replace React.createFactory with React.createElement