У меня есть быстрое приложение iOS. Я интегрирую его в реакцию-родной. Но когда я добавил «import (Canvas, Circle, Image, Path) из« response-fabricjs »; У меня есть ошибка enter image description hereКак импортировать ткань-webpack для реагирования-родной?
моего package.json
{
"name": "uploader",
"version": "1.0.0",
"private": true,
"description": "Uploader",
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"react": "~15.3.0",
"react-dom": "~15.3.0",
"react-fabricjs": "^0.1.6",
"react-native": "~0.34.0",
"jsdom": "~9.9.1"
}
}
моего index.ios.js
'use strict';
// 1
import React from 'react';
import {Canvas,Circle, Image, Path } from 'react-fabricjs';
import ReactNative, {
AppRegistry,
StyleSheet,
Text,
View,
} from 'react-native';
// 2
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'yellow',
},
welcome: {
fontSize: 35,
color: 'green',
},
});
// 3
class AddRatingApp extends React.Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>See you later alligator !</Text>
</View>
)
}
}
// 4
AppRegistry.registerComponent('AddRatingApp',() => AddRatingApp);
Как я могу импортировать любого Реагировать библиотеку в реакцию-родное приложение?
Благодарим вас за ответ. И нет возможности подключать библиотеки React? – DmitriyYefremov
Реагировать на библиотеки, и вы импортируете их правильно, но React Native не сможет понять библиотеки, в которых используется html/ccs/dom. –
Вы должны попытаться найти интерактивную библиотеку, которая делает то, что вы пытаетесь выполнить. Вот хороший ресурс - https://github.com/jondot/awesome-react-native –