Yes
assuming you are calling it in useEffect
On button presses
Esc. key will show the wrong state so handle that too
there's an event you can register a callback to
Ah I was afraid of such side-effects
it's either resize or fullscreen event... one of those will catch all. Make the button click trigger the fullscreen, and in useEffect add a DOM event listener that sets the react state
Alright, thanks
Обсуждают сегодня