I have an ongoing project and want to display a countdown before site lauch, how do I do this? Is it posible to load the main webpage when countdown == 0? How do I make the coundown component display when site is loaded?
I have created the component, and its working, but don't know how to make it display on site load
CodePudding user response:
Render conditionally Countdown or Main component depending on the countdown value. Something like this:
if (countdown !== 0) {
return <CountDownComponent />
}
return <Main />