react-native-gestures
react-native-gestures copied to clipboard
Element type is invalid :expected String but got : object .... when add <GestureView>
I saw the error when i put <GestureView> into render method. Please tell me why and how to fix it.
me too getting this same error..
same problem using example in README.md
i solved it by editing GestureView.js file
edit line no 11
export default React.createClass({ mixins: [events(['onLayout']), draggableMixin()],
to
const GestureView = React.createClass({ mixins: [events(['onLayout']), draggableMixin()]
and at the last include one line that exports this class
module.exports = GestureView;
Hope this will help you.
@kunalailani This works. Thanks. But could you explain why this fix works?
I am working on a refactor which should fix this issue: https://github.com/kiddkai/react-native-gestures/pull/30
Hotfix from my side
<GestureView.default>
...
</GestureView.default>