react-lite icon indicating copy to clipboard operation
react-lite copied to clipboard

Should I install fastclick by myself?

Open mrdulin opened this issue 7 years ago • 3 comments

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);
	}
};

mrdulin avatar Jan 19 '18 07:01 mrdulin

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

Lucifier129 avatar Jan 19 '18 08:01 Lucifier129

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

mrdulin avatar Jan 19 '18 09:01 mrdulin

@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.

Lucifier129 avatar Jan 19 '18 09:01 Lucifier129