Library to use full screen in ReactJS
npm install @chiragrupani/fullscreen-react 

> Allows any html element to enter full screen using Browser API.
Install the package
``bash`
npm i @chiragrupani/fullscreen-react
Use with class component or function component like below:
> Class component example
`tsx
onChange={(isFullScreen) => {
this.setState({ isFullScreen });
}}
>
> Function component example
`tsx
export default function FSExampleHook() {
let [isFullScreen, setFullScreen] = React.useState(false); return (
<>
isFullScreen={isFullScreen}
onChange={(isFull: boolean) => {
setFullScreen(isFull);
}}
>
Fullscreen
>
);
}
`If you require entire document in fullscreen instead of any specific element use
DocumentFullScreen instead of FullScreen like below. However, there can be atmost one DocumentFullScreen:`tsx
isFullScreen={this.state.isFullScreen}
onChange={(isFullScreen) => {
this.setState({ isFullScreen });
}}
>
Fullscreen
``