Gigasz / react-native-sketch-canvas

A React Native component for drawing by touching on both iOS and Android.
MIT License
13 stars 14 forks source link

Undefined is not an Object -> UIManager.getViewManagerConfig('RNSketchCanvas').Constants #3

Open jasonnathan opened 5 years ago

jasonnathan commented 5 years ago

This is a new issue reproduced with a fresh project of react-native and this package.

Packages/Versions

"@gigasz/react-native-sketch-canvas": "^0.8.3",
"react": "16.8.6",
"react-native": "0.60.5"

Component Code (copied from example in README.md)

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  View,
} from 'react-native';

import { SketchCanvas } from '@gigasz/react-native-sketch-canvas';

export default class example extends Component {
  render() {
    return (
      <View style={styles.container}>
        <View style={{ flex: 1, flexDirection: 'row' }}>
          <SketchCanvas
            style={{ flex: 1 }}
            strokeColor={'red'}
            strokeWidth={7}
          />
        </View>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF',
  },
});

Error Apparently, UIManager.getViewManagerConfig('RNSketchCanvas').Constants is undefined in Line 258 of SketchCanvas.js.

Screenshot 2019-08-16 at 8 01 43 AM
mugimugitkr commented 5 years ago

same issue happened.