Comments (4)
could you provide a code example?
from react-flip-clock-countdown.
could you provide a code example?
Looks not perfect, but with force render timer works better due browser tabs switch:
import { useEffect, useState } from "react";
import FlipClockCountdown from "@leenguyen/react-flip-clock-countdown";
export default function CustomFlipClockCountdown({ className, onComplete, to, labels }) {
const [_, forceRender] = useState({});
useEffect(() => {
const forceUpdate = () => forceRender({});
document.addEventListener("visibilitychange", forceUpdate);
return () => document.removeEventListener("visibilitychange", forceUpdate);
}, []);
return <FlipClockCountdown key={_} className={className} onComplete={onComplete} to={to} labels={labels} />;
}
from react-flip-clock-countdown.
@Kostanios
Sorry. I mean the code to reproduce this issue
from react-flip-clock-countdown.
Ah. No worries. I've just understood your issue
from react-flip-clock-countdown.
Related Issues (11)
- `digitBlockStyle` is not working HOT 1
- hide day HOT 4
- className in typescript HOT 5
- Default value for clock HOT 5
- Allows countdown for a period of time HOT 1
- feat: allow modifying margin of the UI elements HOT 4
- Bug: Safari has issues when rendering multiple FlipClockCountdowns HOT 5
- Bug: Safari glitch when using CSS perspective HOT 7
- defaultProps warning using React 18 HOT 1
- Feature: Allow modify border radius of digitBlock HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-flip-clock-countdown.