use-fullscreen
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -62,6 +62,6 @@ "use strict"; | ||
var _a = react_1.useState(isBrowserFullscreen()), isFullscreen = _a[0], setState = _a[1]; | ||
function handleFullscreenChange() { | ||
setState(isBrowserFullscreen()); | ||
} | ||
react_1.useEffect(function () { | ||
function handleFullscreenChange() { | ||
setState(isBrowserFullscreen()); | ||
} | ||
if (fullscreenEnabled) { | ||
@@ -68,0 +68,0 @@ doc.addEventListener(changeEvent, handleFullscreenChange); |
@@ -59,6 +59,6 @@ import { useEffect, useState } from 'react'; | ||
const [isFullscreen, setState] = useState(isBrowserFullscreen()); | ||
function handleFullscreenChange() { | ||
setState(isBrowserFullscreen()); | ||
} | ||
useEffect(() => { | ||
function handleFullscreenChange() { | ||
setState(isBrowserFullscreen()); | ||
} | ||
if (fullscreenEnabled) { | ||
@@ -65,0 +65,0 @@ doc.addEventListener(changeEvent, handleFullscreenChange); |
{ | ||
"name": "use-fullscreen", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Fullscreen hook for React", | ||
@@ -24,3 +24,4 @@ "keywords": [ | ||
"build:esm": "tsc --target es6 --outDir esm", | ||
"build:cjs": "tsc --target es5 --lib DOM,ES2015 --outDir cjs" | ||
"build:cjs": "tsc --target es5 --lib DOM,ES2015 --outDir cjs", | ||
"prepare": "npm run build" | ||
}, | ||
@@ -27,0 +28,0 @@ "author": "Jacob Rask", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7987