Branch: master
Clone or download
lpww Merge pull request #134 from nearform/renovate/eslint-plugin-react-ho…
…oks-1.x

Update dependency eslint-plugin-react-hooks to v1.2.0
Latest commit 6c033fd Feb 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Check for CI based on env var Feb 15, 2019
bin Improve CI check Feb 15, 2019
src Use object for options Feb 16, 2019
storybook Merge pull request #120 from nearform/test-mouse-position Feb 19, 2019
test Merge pull request #120 from nearform/test-mouse-position Feb 19, 2019
.eslintrc Various improvements and fixes Feb 6, 2019
.gitignore Storybook documentation init (#40) Feb 4, 2019
.huskyrc Use lint-staged Jan 30, 2019
.jest.babelconfig.json Use jest-specific babel config to allow nwb to build Feb 7, 2019
.lintstagedrc Use lint-staged Jan 30, 2019
.prettierrc Various improvements and fixes Feb 6, 2019
CODE_OF_CONDUCT.md Add code of conduct Feb 4, 2019
CONTRIBUTING.md Resize, Scroll, MousePosition, Fullscreen (#53) Feb 6, 2019
LICENSE feat: first version of fullscreen hook and basic demo Jan 18, 2019
README.md Fix npm link Feb 19, 2019
jest.config.js Use jest-specific babel config to allow nwb to build Feb 7, 2019
jest.transform.js Use jest-specific babel config to allow nwb to build Feb 7, 2019
netlify.toml Storybook documentation init (#40) Feb 4, 2019
nwb.config.js default export umd entry file Feb 12, 2019
package.json Update dependency eslint-plugin-react-hooks to v1.2.0 Feb 21, 2019
renovate.json Add renovate.json Feb 8, 2019
umd.js

README.md

react-browser-hooks

React Browser Hooks

CircleCI NPM version Coverage Status Netlify Status BrowserStack Status

A simple utility library that provides custom hooks for some common browser events.

Installation

npm:

npm install @nearform/react-browser-hooks

Documentation & Demo

You can find documentation and demo on https://react-browser-hooks.netlify.com/

Example Usage

E.g. The FullScreen hook:

import { useFullScreen } from '@nearform/react-browser-hooks'

const fs = useFullScreen()
<button onClick={fs.toggle}>{fs.fullScreen ? 'Close' : 'Open'}</button>

Server-side rendering

Sensible defaults are provided to allow each hook to be safely used when rendering on the server.

License

Copyright 2019 NearForm

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

BrowserStack

We use BrowserStack to support as many browsers and devices as possible