detect-resize
Detect element resize in universal applications.
Last updated 4 years ago by cchamberlain .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install detect-resize 
SYNC missed versions from official npm registry.

detect-resize

Slightly refactored version of https://github.com/sdecima/javascript-detect-element-resize targeting universal React applications. Will not throw if imported (ES6) on the server.

Build Status

NPM

Install

npm i -S detect-resize

How to use

Should work the same as javascript-detect-element-resize without throwing errors if used in a server environment.

import { addResizeListener, removeResizeListener } from 'detect-resize'

const resizeElement = document.getElementById('resizeElement'),
const handleResize = () => { console.info('resized') }

addResizeListener(resizeElement, handleResize)
removeResizeListener(resizeElement, handleResize)

Current Tags

  • 0.1.5                                ...           latest (4 years ago)

5 Versions

  • 0.1.5                                ...           4 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 28
Last Day 1
Last Week 25
Last Month 70
Dependencies (1)
Dev Dependencies (11)

Copyright 2014 - 2016 © taobao.org |