New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@schibstedspain/sui-react-hooks

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@schibstedspain/sui-react-hooks - npm Package Compare versions

Comparing version 1.9.0 to 1.10.0

lib/useScroll/index.js

12

CHANGELOG.md

@@ -5,2 +5,14 @@ # Change Log

# 1.10.0 (2020-02-25)
### Features
* added useScroll hook ([413a529](https://github.com/SUI-Components/schibsted-spain-components/commit/413a52956fc2ef37bfdca1496c909d7fade0f141))
* applied the Pull Request suggestions ([de39585](https://github.com/SUI-Components/schibsted-spain-components/commit/de395850fcaeb71a23e5547875672604bc0ea816))
* improve and optimize the code ([aaf0ede](https://github.com/SUI-Components/schibsted-spain-components/commit/aaf0ede0d1497605afd2cc670eabe28adfb69095))
* removed unnecessary array argument ([daf7da0](https://github.com/SUI-Components/schibsted-spain-components/commit/daf7da0567b3a6139fbea39abe067f7ad4fe67b6))
# 1.9.0 (2020-02-24)

@@ -7,0 +19,0 @@

3

lib/index.js

@@ -12,2 +12,3 @@ export default function ReactHooks() {

export { default as useOnScreen, useNearScreen } from './useOnScreen';
export { default as usePrevious } from './usePrevious';
export { default as usePrevious } from './usePrevious';
export { default as useScroll } from './useScroll';
{
"name": "@schibstedspain/sui-react-hooks",
"version": "1.9.0",
"version": "1.10.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -157,2 +157,23 @@ # ReactHooks

> **Find full description and more examples in the [demo page](#).**
### useScroll
Hook to get the scroll position and the direction of scroll, limited to the Y axis.
The hook `useScroll` always returns an object with **position** and **direction of scroll**
```js
import {useScroll} from '@schibstedspain/sui-react-hooks'
export default function Demo() {
const {position, direction} = useScroll()
return (
<>
<p>{`Scroll position: ${position}`}</p>
<p>{`Scroll direction: ${direction}`}</p>
</>
)
}
```
> **Find full description and more examples in the [demo page](#).**
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc