1.2.11 • Published 2 years ago

react-window-observer v1.2.11

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

React Window Observer

React window observer is a library build to facilitate the process of matching the media of your device and check the scroll direction for other purposes like showing the navbar accordingly.

Installation

 npm i react-window-observer

Usage

import { useScrollDirection, useWindowMedia } from "react-window-observer"

const MyComponent = () => {
  const direction = useScrollDirection();
  const isTrue = useWindowMedia(540); // It defaults to 640 if no parameter is given

  console.log(direction);
  console.log(isTrue)

  return <div>My Component</div>
};

export default MyComponent
1.2.8

2 years ago

1.2.9

2 years ago

1.2.10

2 years ago

1.2.11

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.1.0

2 years ago