mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-11 12:16:58 +03:00
23 lines
521 B
JavaScript
23 lines
521 B
JavaScript
// require.ensure([], function(require) {
|
|
// require.include('../playground/page');
|
|
// });
|
|
var React = require('react');
|
|
class App extends React.Component {
|
|
constructor() {
|
|
super();
|
|
this.state = { currentComponent: null };
|
|
}
|
|
componentDidMount() {
|
|
require(["playground-page"], (Playground) =>{
|
|
this.setState({
|
|
currentComponent: Playground
|
|
});
|
|
});
|
|
}
|
|
render() {
|
|
var Current = this.state.currentComponent;
|
|
return Current?<Current />:null;
|
|
}
|
|
}
|
|
module.exports = App;
|