React hook that returns a boolean indicating whether body scroll is currently canceled.
It observes changes to the body's overflow style and updates automatically.
Returns boolean
true if body scroll is canceled (overflow: hidden), otherwise false.
Example
constisBodyScrollCanceled = useIsBodyScrollCanceled(); if (isBodyScrollCanceled) { // Body scroll is disabled }
React hook that returns a boolean indicating whether body scroll is currently canceled. It observes changes to the body's
overflowstyle and updates automatically.