Open
Description
Summary
Hi @terrylinla,
We have identified that this library is not working with the RN new architecture. So we have moved forward with RN 0.72.1 to enable this legacy module with the interop layer and new arch as suggested here -> reactwg/react-native-new-architecture#135
Reproducible sample code -
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
View,
} from 'react-native';
import { SketchCanvas } from '@terrylinla/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',
},
});
AppRegistry.registerComponent('example', () => example);
Steps to reproduce
- yarn add react-native-sketch-canvas
- cd ios
- bundle install
- RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
- cd ..
- open android/gradle.properties
- change the newArchEnabled boolean from false to true
- Add the component to unstable_reactLegacyComponentNames array in react-native.config.js
- npx react-native run-ios
- npx react-native run-android
- Update the App.js file with the snippet in the Reproducible Sample Code section
Expected result -
- Module opens and we are able to save the edited sketch
Actual Result -
-Module opens and we are able to add a sketch but then it throws this exception -
React Native Sketch Canvas Version
0.8.0
What platforms are you seeing the problem on?
Android, iOS
React Native Version
0.72.1
What version of Expo are you using?
Not using Expo
Device(s)
iPhone 14 (iOS 16.4) | Android Pixel 5 (API 33)
Additional information
No response
Metadata
Assignees
Labels
No labels