react-scroll-to-bottom icon indicating copy to clipboard operation
react-scroll-to-bottom copied to clipboard

TypeError: Object(...) is not a function

Open BuddhaL1T3 opened this issue 4 years ago • 7 comments

I keep getting this error when i try to declare anything from this package... struggling to know where to start to debug... copied the imports and the declarations from the demo code

import { useAnimating, useAtBottom, useAtEnd, useAtStart, useAtTop, useMode, useScrollTo, useScrollToBottom, useScrollToEnd, useScrollToStart, useScrollToTop, useSticky } from 'react-scroll-to-bottom';

const MyComponent = props => {

const [animating] = useAnimating(); const [atBottom] = useAtBottom(); const [atEnd] = useAtEnd(); const [atStart] = useAtStart(); const [atTop] = useAtTop(); const [mode] = useMode(); const [sticky] = useSticky();

const scrollTo = useScrollTo(); const scrollToBottom = useScrollToBottom(); const scrollToEnd = useScrollToEnd(); const scrollToStart = useScrollToStart(); const scrollToTop = useScrollToTop();

}

export default MyComponent;

ERROR ==> TypeError: Object(...) is not a function

I'm using "react": "16.9.0"

BuddhaL1T3 avatar Nov 04 '19 20:11 BuddhaL1T3

Same

emdotem avatar Nov 07 '19 19:11 emdotem

Same, please help me

tranphuquy19 avatar Dec 13 '19 08:12 tranphuquy19

same

diam95 avatar Feb 18 '20 14:02 diam95

Let me look at this one over next 1-2 weeks.

Will be great if someone have a repo that repro this issue.

compulim avatar Feb 19 '20 18:02 compulim

I believe you just need to publish the latest version to npm.

stevewillard avatar Mar 20 '20 04:03 stevewillard

Is it still an issue for you?

compulim avatar Jun 22 '20 08:06 compulim

Is it still an issue for you?

I do not have THIS problem anymore. Thank you! But I am having trouble getting any type of functionality to occur. Are there other examples that I can view to get better direction? I even when as far as to copy/paste the SAMPLE CODE from https://www.npmjs.com/package/react-scroll-to-bottom with no luck. I'm sure it's just user error, but more thorough examples or explicit direction would be wonderful. Thank you for addressing the initial issue.

BuddhaL1T3 avatar Jun 22 '20 13:06 BuddhaL1T3