Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VisibilitySensor doesn't fire on smaller devices #192

Open
TendezaDev opened this issue Aug 16, 2022 · 0 comments
Open

VisibilitySensor doesn't fire on smaller devices #192

TendezaDev opened this issue Aug 16, 2022 · 0 comments

Comments

@TendezaDev
Copy link

I'm combining it with the component. It does fire on desktop-size screens, but not anything smaller, is this a known issue?

const [stateVisible, setStateVisible] = useState(false);

    function onChange(isVisible:any) {
        if(isVisible){
            setStateVisible(true);
        }
    }
    return(
        <section id="Steps" className="bg-beige">
            <div className="container px-6 lg:py-60 mx-auto ssm:pt-6">
                <VisibilitySensor onChange={onChange}>
                    <FadeIn transitionDuration={800} visible={stateVisible}>
                        // bzbz some code
                     </FadeIn>
                 </VisibilitySensor>
             </div>
         </section>
    );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant