import React from 'react';
import AppComponent from './components/app';

let tempY = 0;

let app = React.render(
    React.createElement( AppComponent, {history: true} ),
    document.getElementById('app')
);

function animate() {
    tempY++;
    app.props.robotPosition = new THREE.Vector3(0, tempY, 0);
    app.render();
    requestAnimationFrame(animate);
}

animate();

import React from 'react';
import AppComponent from './components/app';

let tempY = 0;

let appState = { history: true, robotPosition: new THREE.Vector3(0,0,0) }

function animate() {
    tempY++;
    appState.robotPosition.y = tempY;
    React.render(
        React.createElement( AppComponent, appState ),
        document.getElementById('app')
    );
  
    requestAnimationFrame(animate);
}

animate();

Switch app updates to use React.render()
Switch app updates to use React.render()
