Invariant Violation: Element type is invalid: expected a string
JeremyBradshaw7 opened this issue · 1 comments
JeremyBradshaw7 commented
> Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
This error thrown on just trying the sample code on iOS and Android. I'm pretty sure I've done all the installation tasks correctly, including the webview-bridge.
import RichTextEditor from 'react-native-zss-rich-text-editor';
<RichTextEditor
ref={(r) => this.richtext = r}
initialTitleHTML={'Title!!'}
initialContentHTML={'Hello <b>World</b> <p>this is a new paragraph</p> <p>this is another new paragraph</p>'}
editorInitializedCallback={() => this.onEditorInitialized()}
/>
React Native 0.56
JeremyBradshaw7 commented
Found my mistake, should have been imported with:
import { RichTextEditor } from 'react-native-zss-rich-text-editor';
Please update your readme to include this!