JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q27645F
  • License MIT

Simple, yet powerful touch-force level detector

Package Exports

  • react-forceify

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-forceify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-forceify

React wrapper for Forceify

Installing

$ npm install react-forceify
# or
$ yarn add react-forceify

CDN

# unpkg.com
https://unpkg.com/react-forceify

# npmcdn
https://npmcdn.com/react-forceify

# jsDelivr
https://cdn.jsdelivr.net/npm/react-forceify

Usage

import Forceify from 'react-forceify';
import React from 'react';
import ReactDOM from 'react-dom';

class MyApp extends React.Component {
    onForce = ({force}) => {
        console.log('Force level', force);
    }
    render () { 
        return (<Forceify onForce={this.onForce}>
        {'child elems'}
        </Forceify>)
    }
}

ReactDOM.render(<MyApp/>, myMountTarget);

Compatibility

It's target is ES3 compatible-browsers, but it works best within following browser:

Browser Supported Version Recommended Version Best Version
IE >9 >10 >11
Android >4.1.2 >4.4 >5.1
iOS >7 >9 >10
macOS/OS X >9 >10 >10.12
Firefox >15 > 35 >47

License

MIT