mirror of
				https://github.com/graphql-python/graphene.git
				synced 2025-11-01 00:17:26 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			453 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			453 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import React from 'react';
 | |
| 
 | |
| class PlaygroundWrapper 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 = PlaygroundWrapper;
 |