Skip to content

Enhanced TypeScript Integration & Streamlined Hook Usage

Compare
Choose a tag to compare
@SMAKSS SMAKSS released this 12 Sep 10:27
· 74 commits to master since this release

πŸš€ Features and Improvements:

  • Simplified Hook Usage: With the addition of default assignments to props, you can now seamlessly employ useDetectScroll without passing an empty object for default options.

    const scrollDir = useDetectScroll();
  • SSR Compatibility: Addressing the issue where the useDetectScroll hook utilized the window object to establish the initial value of lastScroll, causing a ReferenceError during server-side rendering in platforms like Next.js, we've introduced a fix. The solution initializes lastScroll to 0 and repositions the window object reference within the useEffect hook, ensuring it's solely accessed on the client-side, thus sidestepping the error.

  • Upgraded Dependencies: In our commitment to maintaining current, we've updated our package dependencies.

  • πŸ“œ Pull Request Template: A PR template has been embedded to streamline and standardize the pull request process, ensuring consistent quality and clarity.

  • PR Checks CI: Every pull request will now undergo a rigorous CI check aimed at maintaining code quality and flagging any errors, ensuring that the codebase remains robust and efficient.

  • Pre-commit Hooks: To further our drive towards excellence, we've embedded pre-commit hooks. These are tailored to check types, formatting, and commit messages, ensuring the highest standards are maintained even before code hits the repository.


Thank you for your unwavering support and contributions. They're invaluable in our journey of refining and improving this package. Should you have queries or feedback regarding this release, please reach out; we're all ears.

Also, a special thanks to @drichar for their contribution to this release.