bamlab / react-native-image-header-scroll-view

ScrollView with an image in header which becomes a navbar
MIT License
990 stars 94 forks source link

React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. #116

Open Afondevi opened 2 years ago

Afondevi commented 2 years ago

Hello,

I get this error on use like your doc :

React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

And HeaderImageScrollView component is not define as component : JSX element type 'HeaderImageScrollView' does not have any construct or call signatures.ts(2604)

image

Thanks in advance

dev-arsh commented 2 years ago

@Afondevi The demo code on package does not have updated import statements. Use this,

import { TriggeringView, ImageHeaderScrollView } from 'react-native-image-header-scroll-view';

PROMEDIK-INDONESIA commented 2 years ago

@Afondevi The demo code on package does not have updated import statements. Use this,

import { TriggeringView, ImageHeaderScrollView } from 'react-native-image-header-scroll-view';

Thank you so much for this