open-index/open-npm huggingface dataset:
npm package: @kensie/create-context-hook
Description: Simple utility to create context-bound React hooks.
Author: kensiebliss
Latest version: 0.0.11

# @kensie/create-context-hook

Simple utility to create context-bound React hooks.

## Install

```bash
npm install --save @kensie/create-context-hook
```

## Usage

```jsx
import * as React from 'react'
import { createContextHook } from '@kensie/create-context-hook'

const [FooProvider, useFooStore, FooContext] = createContextHook((providerProps) => {
  const [foo, setFoo] = React.useState('foo' + providerProps.suffix)
  return { foo, setFoo }
})

const App = () => {
  return (
    <FooProvider suffix="ooo">
      <InnerApp />
    </FooProvider>
  )
}

const InnerApp = () => {
  const { foo, setFoo } = useFooStore()

  return (
    <div>
      <h1>{foo}</h1>
      <button onClick={() => setFoo(foo.toUpperCase())}>
        uppercase foo
      </button>
    </div>
  )
}
```

## License

MIT © [kensiebliss](https://github.com/kensiebliss)

---

This package was created using [create-react-hook](https://github.com/hermanya/create-react-hook).
npm package: @kensingtontech/hamsterjs
Description: A standalone javascript library for cross-browser mouse wheel support
Author: Scott Boyle
Latest version: 1.1.6

Hamster.js
==========

A standalone javascript library for cross-browser mouse wheel support.

[See it in action](http://monospaced.github.io/hamster.js).

Usage
-----

The event callback receives 3 extra arguments which are the normalized “deltas” of the mouse wheel.

```js
var hamster = Hamster(el, false); // boolean is whether passive = true | false

hamster.wheel(function(event, delta, deltaX, deltaY){
  console.log(delta, deltaX, deltaY);
});

// destroy
hamster.unwheel();
```

Support
-------

The second parameter to Hamster() is optional, and indicates whether to mark the event listener as passive, for performance.  Please do your research about passive event listeners before turning this on.

No jQuery or other libraries are required, but an <a href="http://github.com/monospaced/angular-mousewheel">adapter for AngularJS</a> is available.

Tested in these [core browsers](http://monospaced.github.io/obs).

Install
-------

    npm install hamsterjs
    bower install hamsterjs

Demo
----

[monospaced.github.io/hamster.js](http://monospaced.github.io/hamster.js)

Reference
---------

* [jquery-mousewheel](https://github.com/brandonaaron/jquery-mousewheel)
* [wheel event on MDN](https://developer.mozilla.org/en-US/docs/DOM/Mozilla_event_reference/wheel)
* [Passive Event Listeners by Google](https://developers.google.com/web/updates/2016/06/passive-event-listeners)