
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@jsnooks/use-fullscreen
Advanced tools
[실습예제]
import React, { useRef } from 'react';
const useFullScreen = (callback) => {
const element = useRef();
const runCb = (isFull) => {
if (callback && typeof callback === 'function') {
callback(isFull);
}
};
const triggerFull = () => {
if (element.current) {
element.current.requestFullscreen();
runCb(true);
}
};
const exitFull = () => {
const checkFullScreen = document.fullscreenElement;
if (checkFullScreen !== null) {
document.exitFullscreen();
runCb(false);
}
};
return { element, triggerFull, exitFull };
};
const App = () => {
const callback = (isFull) => {
console.log(isFull ? 'We are full' : 'We are small');
};
const { element, triggerFull, exitFull } = useFullScreen(callback);
return (
<div
className='App'
style={{ height: '1000vh' }}
>
<div ref={element}>
<img
src='https://i.ibb.co/R6RwNxx/grape.jpg'
alt='grape'
width='250'
/>
<button onClick={exitFull}>Exit fullscreen</button>
</div>
<button onClick={triggerFull}>Make fullscreen</button>
</div>
);
};
export default App;
FAQs
React Hook to make any element go Fullscreen
We found that @jsnooks/use-fullscreen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.