我正在使用draft-js在react-app上工作但是当我运行我的应用程序时,我总是有这个错误
这是我的js:
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import {Editor, EditorState} from 'draft-js';
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {editorState: EditorState.createEmpty()};
this.onChange = (editorState) => this.setState({editorState});
}
render() {
return (
<Editor editorState={this.state.editorState} onChange={this.onChange} />
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});