gm0t / react-sticky-el

MIT License
251 stars 47 forks source link

Type invalid in version 1.1.1 #53

Closed davidpatters0n closed 4 years ago

davidpatters0n commented 4 years ago

I'm trying to migrate from react-sticky, and we're using Version 1.1.1. Upon using this version we're finding that we're getting the following error message:

Warning: 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.

I noticed this was similar to: https://github.com/gm0t/react-sticky-el/issues/10 and was wondering if this bug was reintroduced?

Example looks like this:

<Sticky>
   <div className="Sidebar__body" />
</Sticky>

I've confirmed that by removing this component around the div the error goes away.

gm0t commented 4 years ago

hey @davidpatters0n! Could you please provide a bit more information on how you import the package?

davidpatters0n commented 4 years ago

I actually was able to get it working. Closing.