Skip to content

ScrollDir is always down #258

Closed
Closed
@astralarya

Description

@astralarya

Brief Description

The scroll direction hook always returns down, even when scrolling up.

Environment

  • @smakss/react-scroll-direction version: 4.04
  • Framework version: react
  • node.js version: 20.8.0
  • yarn version: 1.22.19

Code Snippet

export default function Example() {
  const { scrollDir } = useDetectScroll();

  console.log(scrollDir);

  return "ababa";
}

Steps to Reproduce

Scroll up and down

Expected Behavior

Scrolling up returns up.

Actual Behavior

Events always return direction as down.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions