react-native-hammerjs icon indicating copy to clipboard operation
react-native-hammerjs copied to clipboard

[Android] connectEventHandlers is not a function

Open julesmoretti opened this issue 9 years ago • 4 comments

On implementation the return connectEventHandlers( is throwing an error.

Any idea why?

This is for Android...

Using the following setups:

  "dependencies": {
    "react": "15.4.1",
    "react-native": "0.38.0",
    "react-native-hammerjs": "^2.0.9",
    "react-native-svg": "^4.4.0",
    "react-redux": "^4.4.6",
    "redux": "^3.6.0"
  },
  "jest": {
    "preset": "react-native"
  },
  "devDependencies": {
    "babel-jest": "17.0.2",
    "babel-preset-react-native": "1.9.0",
    "jest": "17.0.3",
    "react-test-renderer": "15.4.1"
  }

component setup:


import React, {Component} from 'react';
import {
	View,
	Text,
	StyleSheet,
	TouchableHighlight,
	Image,
	Animated,
	Easing
} from 'react-native';

import { Hammer, injectHammer } from 'react-native-hammerjs';

import Svg,{
	G,
	RadialGradient,
	Path
} from 'react-native-svg';

export class Mycomponent extends Component {
...

julesmoretti avatar Dec 01 '16 19:12 julesmoretti

Note: There is no this.props.hammer available for the const mc variable event if I move up the import react...hammer to the top.

julesmoretti avatar Dec 01 '16 19:12 julesmoretti

@julesmoretti I cannot reproduce. Do you have a public repo/gist that I can examine? Also, are you able to build and run Example project?

BTW, I've just update dependencies & build tools for Example project. Feel free to check it out on master branch.

longseespace avatar Dec 03 '16 12:12 longseespace

@longseespace - thank you for updating it.

I did clone and ran the example project, and was only able to get 'tab' and 'double tap' working.

But unfortunately none of the other ones worked on Android emulator and physical device.

The ones I am looking for specifically is Pan.

Here is my setup:

Lenovo yoga (Lenovo YT3-X50F - 5.1.1)

node 7.0.0

[jmoretti:.../ReactNativeHammerJSExample]$ npm -g list --depth=0                        (master✱) 
/usr/local/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]


[jmoretti:.../ReactNativeHammerJSExample]$ npm list --depth=0                           (master✱) 
[email protected] /Users/jmoretti/Git/react-native/react-native-hammerjs/ReactNativeHammerJSExample
├── [email protected]
├── [email protected]
└── [email protected]
screen shot 2016-12-04 at 2 39 28 pm

julesmoretti avatar Dec 04 '16 22:12 julesmoretti

Some gestures don't work in Android due to this bug: https://github.com/facebook/react-native/issues/7221.

longseespace avatar Jan 11 '17 08:01 longseespace