1.11.0 • Published 3 years ago

@liinkiing/react-hooks v1.11.0

Weekly downloads
61
License
MIT
Repository
github
Last release
3 years ago

React hooks

A simple personal list of useful hooks I've made for React.

Installation

With yarn

$ yarn add @liinkiing/react-hooks

With npm

$ npm i @liinkiing/react-hooks

Documentation

https://liinkiing.github.io/react-hooks/globals.html

Example

import * as React from 'react'
import {FunctionComponent} from 'react'
import {useResize, useKeyboardShortcuts} from '@liinkiing/react-hooks';

const App: FunctionComponent = props => {
  const { height, width } = useResize()
  console.log(height, width)
  
  useKeyboardShortcuts([
    {
      action: () => { console.log("You've pressed I or S")},
      keys: ["I", "S"]
    },
    {
      action: () => { console.log("You've pressed O")},
      keys: ["O"]
    },
    {
      action: () => { console.log("You've pressed U")},
      keys: ["U"]
    }
  ])
  return (
    <div>
      <h1>App</h1>
    </div>
  )
}

export default App
1.11.0

3 years ago

1.10.3

4 years ago

1.10.2

4 years ago

1.9.1

4 years ago

1.9.3

4 years ago

1.9.2

4 years ago

1.10.1

4 years ago

1.10.0

4 years ago

1.8.1

4 years ago

1.8.0

4 years ago

1.7.6

4 years ago

1.7.5

4 years ago

1.7.4

5 years ago

1.7.3

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.3

5 years ago

1.6.2

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.1.0

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago