apeman-react-mixin-resize

apeman react package for resize mixins

Usage no npm install needed!

<script type="module">
  import apemanReactMixinResize from 'https://cdn.skypack.dev/apeman-react-mixin-resize';
</script>

README

apeman-react-mixin-resize

Build Status Code Climate Code Coverage npm Version JS Standard

apeman react package for resize mixins

Installation

$ npm install apeman-react-mixin-resize --save

Usage

#!/usr/bin/env node

'use strict'

import React from 'react'
import {ApResizeMixin} from 'apeman-react-mixin-resize'

// Define own component with the mixin
const ExampleComponent = React.createClass({
  mixins: [
    // Add listener to resize event.
    ApResizeMixin
  ],
  render () {
    return (
      <div>{ /* ... */ }</div>
    )
  },

  // --------------------
  // For ApResizeMixin
  // --------------------
  windowDidResize () {
    // Called when window resized.
    /* ... */
  }
})

License

This software is released under the MIT License.

Links