Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Invariant Violation: View config getter callback for component canvas must be a function (received undefined). Make sure to start component names with a capital letter. #135

Open
Moodax opened this issue Jan 26, 2022 · 0 comments

Comments

@Moodax
Copy link

Moodax commented Jan 26, 2022

When trying to run CanvasDraw on Android, I get this error from the title. Everything is fine when using web browser, but for some reason it doesn't work on Android.
This is the code I'm using:

import React from 'react';
import { Dimensions,StyleSheet, View } from 'react-native';
import CanvasDraw from "react-canvas-draw";

  function Library({ navigation }) {
  return (
    <View style={styles.container}>
    <View style={{ backgroundColor: "blue", flex: 0.2}} >
    </View>
    <View style={{ backgroundColor: "red", flex: 0.8,maxHeight:"100%",maxWidth:"100%" }}  >
    <CanvasDraw style={{ position:'relative',height:'100%',width:'100%' }}
    canvasHeight={Dimensions.get('window').height}
     canvasWidth={Dimensions.get('window').width}
     brushColor='black'
      hideGrid
     />
     </View>
     </View>
  )
  
  }
  export default Library;

  const styles = StyleSheet.create({
    container: {
      backgroundColor: '#fff',
      width:'100%',
      flexDirection:"row",
      height:'100%',
      maxHeight:'100%',
      maxWidth:'100%'
    },
  });
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant