import React, { Component } from "react";
import Fullscreen from 'react-fullscreen-crossbrowser';
class App extends Component {
constructor(props) {
this.state = {
isFullscreenEnabled: false,
};
}
render() {
return (
<div className="App">
<button onClick={() => this.setState({isFullscreenEnabled: true})}>
Go Fullscreen
</button>
<Fullscreen
enabled={this.state.isFullscreenEnabled}
onChange={isFullscreenEnabled => this.setState({isFullscreenEnabled})}
>
<div className='full-screenable-node'>
Hi! This may cover the entire monitor.
</div>
</Fullscreen>
</div>
);
}
}
export default App;