nerdchacha / react-hoverintent

MIT License
13 stars 6 forks source link

Cannot use with styled-components #5

Open joetidee opened 7 years ago

joetidee commented 7 years ago

I am trying to use this with a styled-component:

const someContainer = () => {
    return (
        <HoverIntent
            onMouseOver={() => doSomething()}
            sensitivity={10}
            interval={1000}
            timeout={250}
        >
            <StyledComponent>
                {children}
            </StyledComponent>
        </HoverIntent>
    );
};

but getting this error:

Cannot read property 'removeEventListener' of undefined

nerdchacha commented 7 years ago

Hi @joetidee

Apologies, but i have been really caught up with some other assignment as of now. I would need some time to look into this. In case you have found a fix for this, it would be great if you could create a PR and i would be more than happy to merge.

Thanks