-
Notifications
You must be signed in to change notification settings - Fork 132
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
react-countup fails to work in next.js produnction environment #822
Comments
there is a workaround. Code fails to work in nextjs production mode
Code works in next.js production mode
|
Does anyone have any idea what if I wanted to render the counter with a delay ? |
work for me Currently react-countup is having issues with the import VisibilitySensor from 'react-visibility-sensor';
<CountUp end={400}>
{({ countUpRef, start }) => (
<VisibilitySensor onChange={start}>
<span ref={countUpRef} />
</VisibilitySensor>
)}
</CountUp> ref: https://stackoverflow.com/questions/73210108/problem-with-react-countup-enablescrollspy |
Confirm that the dev bundle and prod bundle works in a little bit different way. Issue is still actual for production mode. React, Vite bundler |
i use react-countup (version 6.5.0) in a page router based next.js application.
when i run
pnpm dev
, react-countup works well and the number increases to the target value.when i run 'pnpm start', react-countup fails to work and the number keeps to be zero.
The text was updated successfully, but these errors were encountered: