Lucifier129 / react-lite

An implementation of React v15.x that optimizes for small script size
MIT License
1.73k stars 98 forks source link

Should I install fastclick by myself? #130

Open mrdulin opened 6 years ago

mrdulin commented 6 years ago

I do not see fastclick list on devDependencies of package.json .

Should I install fastclick by myself? Or, just add alias 'react-tap-event-plugin': 'react-lite/lib/react-tap-event-plugin'?

react-lite/lib/react-tap-event-plugin.js:

'use strict';

var Fastclick = require('fastclick');
module.exports = function injectTapEventPlugin() {
    var supportTouch = ('ontouchstart' in document);
    if (supportTouch) {
        Fastclick.attach(document.body);
    }
};
Lucifier129 commented 6 years ago

yes, npm install --save fastclick is necessary when use react-lite/lib/react-tab-event-plugin.

mrdulin commented 6 years ago

@Lucifier129 Why don't include fastclick as react-lite dependency?

Lucifier129 commented 6 years ago

@mrdulin react-lite/lib/react-tab-event-plugin is not the normal usage of react-lite, I think it's better to keep independent in package.json.